On 24 July 2013 20:26, Colin Guthrie <[email protected]> wrote:
> Also as the previous enable would have written the .wants symlink, ti's
> probably work doing a "rm -f
> /etc/systemd/system/network-online.target.wants/pingtest.service" to
> ensure it's cleaned out properly (in theory it shouldn't do any harm,
> but perhaps an existing symlink here is somehow overriding the requires
> one...)

Ah, that was the problem. I had to disable and enable it again to have
my s,Wants,Requires, change to work.

Crikey, systemd has some gotchas. Putting stanzas under wrong headings
and this sucked hours from my life.

> So this smells like something you should trigger via a udev rule
> instead. Certainly the starting of it (you can specify SYSTEMD_UNIT= to
> make it start a unit on hotplug).
> Not sure how you'd handle the killing of it (unless the SYSTEMD_UNIT
> property magically stops it too?)

I would prefer to rely on the `systemctl -t device --all --full | grep
net`. It's a bit sad I can use a wildcard, or some logical OR
statement in BindsTo IIUC=. I find /etc/udev/rules.d a bit gnarly to
say the least!
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to