[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg tries to remove a config file twice ...

On Mon, May 21, 2001 at 12:46:23AM +0200, Othmar Pasteka wrote:
> hi,
> i generate a config file in my postinst, hence it's not marked as
> a conffile. so if the package is purged i have to remove it by
> hand in the postinst:
> # purge the config file which is created in the postinst script
> if [ "$1" = purge ] ; then
>         rm /etc/modlogan/modlogan.conf
> fi
> ok, i've done this. when i now --purge it i get the following:
> rm: cannot remove `/etc/modlogan/modlogan.conf': No such file or
> directory
> after a look at the strace output it tries to remove it twice,
> but can't really say why, maybe i overlooked something.
> is there something i don't know but which must be in one of the
> install/remove scripts?

Change it to "rm -f ...". That way, you wont get an error. You should do
it this way anyway, else your package becomes uninstallable if the user
removes the file before removing the package.


/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '

Reply to: