[Pkg-sysvinit-devel] Bug#705254: Bug#705254: Provide "is-enabled" command for update-rc.d

Henrique de Moraes Holschuh hmh at debian.org
Wed Apr 29 17:15:04 UTC 2015


On Mon, Apr 27, 2015, at 13:19, Borut Mrak wrote:
> I'm working on update-rc.d to add this feature (got bitten by
      this using saltstack service states on Jessie w/ systemd).
>
>
      I simplified Michael's idea a little bit (I think).
>
>
      Instead of checking if links correspond to Default-Start +
      Default-Stop, i'm just checking if there are all the Default-Start
      links available.
>
>
      For is-disabled I'm only checking that there are no S links
      present in Default-Start runlevels.
>
>
      IMO, no links == disabled (I know they get recreated on upgrades,
      but that is out of scope for this feature).
>

This is a problem. The sysv-rc model requires you to actually look at
the symlinks to know whether a service is enabled/disabled, the LSB
headers are more like the metadata which stores "default/upstream
recommended/initially-configured state", as well as dependency
information.

I.e. the LSB headers do NOT matter at all for sysv-rc (the thing that
     actually runs the initscripts): they are not in any way related to
     how the system will behave. They're ancillary metadata which is
     used by update-rc.d (plus startpar for dependency handling) when
     setting up the symlink farm.

Admins are expected, and *do* interact with sysv-rc through the symlink
farm without editing the LSB headers.

Can you change this to actually look for the presence of S/K symlinks?
Beware the way S/K symlinks are used on runlevels 0 and 6, as it could
cause some confusion (I hope there is no need for special casing, but
this needs to be carefully considered).

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond where
the shadows lie." -- The Silicon Valley Tarot Henrique de Moraes
Holschuh <hmh at debian.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20150429/c35d0b06/attachment.html>


More information about the Pkg-sysvinit-devel mailing list