[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



-----BEGIN PGP SIGNED MESSAGE-----
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 --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE//yx1VYan35+NCKcRAhXCAJ9zC4TU1OX5TBqRyOcSeKFfOQoHmACeKD2A
O3faNOVeK9XR1rLn+ud9vYY=
=xWXt
-----END PGP SIGNATURE-----



Reply to: