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

Guidelines are wrong?



Hi Developers,

In the guidelines the following is suggested:

if [ $1 = "purge" ]
then
  update-rc.d <package> remove > /dev/null
fi

However when invoking a postrm script with these lines it without the
option purge on the command line an error is reported.

# /var/lib/dpkg/info/<package>.postrm 
/var/lib/dpkg/info/<package>.postrm: [: =: unary operator expected

Two quotes should be added:
if [ "$1" = "purge" ]
then
  update-rc.d <package> remove > /dev/null
fi

--
Erick Branderhorst@heel.fgg.eur.nl +31-10-4635142
Department of General Surgery (Intensive Care) University Hospital Rotterdam NL


Reply to: