Re: Bug#225465: debian-policy: packages must give choice to notstart at boot, via debconf
I wrote:
> Try:
> . /etc/default/package # this contains "RUN_package_AT_BOOT"
> test -z "$RUN_package_AT_BOOT" && echo $0 | grep -q '^S' && exit 0
Joel writes:
> hmm I try also try this example but failed to me
It should read:
test -z "$RUN_package_AT_BOOT" && echo $(basename $0) | grep -q '^S' && exit 0
It was just an untested example fragment. The idea is to check to see if
the script is being called via one of the sysvinit 'S' symlinks. This lets
you call '/etc/init.d/$PACKAGE' from the command line even if
/etc/default/package is set to prevent startup at boot. It doesn't fix the
problem of daemons being started on reinstallation, though.
> Now I not quite sure how startup scripts are launched: I mean if
> /etc/rci.d is added in the PATH then ok "echo $0 | grep -q '^S'" would
> work OTC not?
I don't understand what you are asking.
> Its major inconvience: not applicable for all shell
If you disable all the K links the daemon won't be shut down properly on
halt or reboot and won't be stopped when entering init 1. I also don't see
why the absence of StartCfgFile should completely disable the script.
--
John Hasler
john@dhh.gt.org
Dancing Horse Hill
Elmwood, Wisconsin
Reply to: