[systemd-devel] Early testing for service enablement

Martin Wilck mwilck at suse.com
Thu Apr 13 08:02:40 UTC 2017


Hi all,

is there a way to test whether a certain service is enabled (or is
going to be enabled) that would work even very early in the boot
process (in our case from udev rules called in the "udev trigger" phase
both in initrd and after switching root)?

I tried calling "systemctl is-enabled" but it obviously depends on some
services (dbus, I guess) being functional, and didn't provide reliable
results during early boot for us. 

We finally resorted to scanning *.wants directories by ourselves, but
that's of course sub-optimal (poor mans partial implementation of
systemd's service enablement logic). 

Regards
Martin

-- 
Dr. Martin Wilck <mwilck at suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)



More information about the systemd-devel mailing list