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

Re: Bug#225465: debian-policy: packages must give choice to notstart at boot, via debconf

Hash: SHA1

> This one time, at band camp, John Hasler said:
> > Miquel van Smoorenburg writes:
> > > It also doesn't work with file-rc, so it is fundamentally broken.
> >
> > test -z "$RUN_package_AT_BOOT" && echo $(basename $0) | grep -q '^S'\
> > || test "$CALL_FROM_RC" = "yes" && exit 0
> How about the simpler:
> if [ -z "$RUN_package_AT_BOOT" -a "$PPID" = "1" ] ; then exit 0 ; fi
> Or does that miss something else?  Thinking about this issue for one of
> my packages, so please reply if you see obvious problems.

Apart from the other problems pointed out I really don't like script to do
completely different things depending on the context of their invocation.
The init script should always perform the action specified. If you do not
want the service to be started at boot, configure your init flavour to not
have it started. Don't introduce some hacks to make init think it is
starting something when in fact it isn't.

I agree that removing and restoring symlinks is not a very conveniet way
to configure startup services, but a proper frontend to manage these links
is a far better solution.

Also any hack you think of now (for instance looking at $0 to see how it
was invoked) will probably break stuff if you use an alernative init
scheme (see for example file-rc or maybe anotherone that has not been
written yet).

- -- arthur - adejong@debian.org - http://people.debian.org/~adejong --
Version: GnuPG v1.0.6 (GNU/Linux)


Reply to: