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

Re: sanity check in init.d



Martin Bialasinski wrote:
> 3) (mein point) The tests do a test -x $DAEMON || exit 0
>    -> This is bad. The Unix way is not to output anything if
>       everything is OK, but report, if something is wrong. 

No it's not. Quoting debian policy:

     These scripts should not fail obscurely when the configuration files
     remain but the package has been removed, as the default in `dpkg' is to
     leave configuration files on the system after the package has been
     removed. Only when it is executed with the `--purge' option will dpkg
     remove configuration files. Therefore, you should include a `test'
     statement at the top of the script, like this: 
              test -f <program-executed-later-in-script> || exit 0

-- 
see shy jo


Reply to: