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

Bug#941194: initscripts: remove some implementation details



Russ Allbery writes:
> I'm hesitant to remove all discussion of run levels because package
> maintainers are still responsible for choosing a run level at which to
> start their service and providing that run level as an argument to
> update-rc.d.

No, maintainer scripts call `update-rc.d <name> defaults`.  There is no
runlevel involved.  The runlevel is only in the LSB init script magic
comment.  However those aren't explained anywhere in Policy, even though
the dependency part was more important than the runlevel part (IMHO)...

>>> Also the rationale for why `DISABLED=yes` (or similar) fits better
>>> into a footnote than the main text (IMHO).
>
>> I'm inclined to agree with you, but since Russ is keen to reduce the
>> number of footnotes in Policy, it would be good to hear from him here.
>
> I don't like footnotes; if something is important enough to say, I think
> it's usually important enough to put into the main text without making
> people click or jump around to find it.  But I think the current paragraph
> in Policy is poorly worded and not as general or as straightforward as it
> could be, and it's weirdly out of place in the update-rc.d section.
>
> How about, rather than moving it to a footnote, rephrasing it as follows?
>
>     Except when the package has been removed but not purged, as described
>     above, the ``/etc/init.d`` script should not decide whether or not to
>     start the daemon based on configuration settings (such as settings in
>     ``/etc/default``) or silently exit successfully when the daemon could
>     not be started.

I think this part isn't that interesting:

>     This causes inconsistent and confusing behavior such
>     as ``service <package> start`` returning success but not starting the
>     service; services with a dependency on this service starting even
>     though the service isn’t running; and init system status commands
>     claiming that the service was started.

(It's a rationale, Policy usually doesn't have those.)

>     If the ``/etc/init.d`` script
>     is invoked with the ``start`` or ``restart`` arguments and the service
>     could not or should not be started, it should produce an appropriate
>     error message and exit with a non-zero status.
>
> and then moving this whole paragraph into 9.3.2, probably as the
> second-to-last paragraph?

Besides that I believe it's fine.

9.3.2 still has other interesting parts that I want to change (such as
suggesting editing /etc/init.d/<name> is a good way to disable
services).  For the conffile-disliking person it also contains the
admission that conffiles are so user-unfriendly on upgrades that there
are conffiles for conffiles, i.e. /etc/default/* ;-)

Ansgar


Reply to: