[systemd-devel] Service enable at runtime after union fs

Lennart Poettering lennart at poettering.net
Wed Feb 5 00:18:02 CET 2014


On Tue, 04.02.14 23:57, Stefano Manni (stefano.manni at gmail.com) wrote:

> Hi,
> 
> I'm facing with a problem while trying to enable services whose files are
> not present at the boot time. Here is the scenario:
> 
> 1. the service *apps-mount.service* mounts a squashfs containing different
> services in union (aufs) on /etc/systemd/system
> 
>     RESULT: in /etc/systemd/system there are now all the new services and
> each contains WantedBy=*apps-started.target*
> 
> 2. the service *apps-start.service* enables all the new services (added in
> point 1) invoking a 'systemctl enable --runtime xxx.service'
> 
>     RESULT: In /etc/systemd/system/apps-started.wants/ there are correctly
> all the links to the enabled services
> 
> 3.* apps-started.target* starts and finishes
> 
>     RESULT: the new services have *not* been started
> 
> Is there a way to change a target's dependencies at runtime before the
> target is launched?

Well, you can issue "systemctl daemon-reload" and then requeue the
target which should pull in the additional new deps.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list