Detecting the init system in use

Martin Pitt martin at piware.de
Sun Dec 17 20:26:34 UTC 2017


Hello all,

Robie Basak [2017-12-13 17:57 +0000]:
> 3) Accept that on Trusty the general case is now broken, and make the
> official test be something like the following. This will need to be
> SRU'd to MAAS in Trusty, and we'll need to fix any other packages in
> Trusty affected by the behaviour change of the original test.
> 
>    if Trusty: upstart
>    else if [ -d /run/systemd/system ]: systemd
>    else [existing checks for other init systems]

After the discussion and seeing the alternatives, this now appears as the
safest and most robust option to me; particularly as this is going to be
introduced as SRUs, and making complicated changes with new namespaces, suid
helpers,  etc. is going to introduce a lot more subtle regressions than it
helps.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20171217/7fc4c5fd/attachment.sig>


More information about the ubuntu-devel mailing list