[systemd-devel] BindTo not working as expected with .target ?

Frederic Crozat fcrozat at suse.com
Wed Jan 25 09:14:41 PST 2012


Hi all,

I'm trying to get a .target working as a "trigger one action then go
back to not activated state" and despite Lennart help on IRC, it keeps
failing, so it might indicate a bug :

foobar.target :
[Unit]
Description=my trigger target
BindTo=myaction.service

myaction.service:
[Unit]
Description=my action

[Service]
ExecStart=/bin/true
Type=oneshot
RemainAfterExit=false

when starting foobar.target, myaction.service is correctly started, then
service terminates, is no longer active, but foobar.target is still seen
as active.

BTW, it could be interesting to allow "foobar.target.bindto" symlink to
be created, so we wouldn't have to modify system targets (for instance,
sigpwr.target ;) to add BindTo dependencies.
-- 
Frederic Crozat <fcrozat at suse.com>
SUSE



More information about the systemd-devel mailing list