[systemd-devel] Unwants

Dimitri John Ledkov dimitri.j.ledkov at intel.com
Thu Jan 22 05:54:37 PST 2015


Is there a way to remove / override wants that are specified via
.wants directory, .d snippet with "Wants=", or wants specified in the
unit itself?

I thought that creating a symlink to /dev/null from a higher up
directory would disable wants dependency but it didn't:

e.g.:
I was expecting for
/run/systemd/system/getty.target.wants/getty at tty1.service -> /dev/null

to cancel

/etc/systemd/system/getty.target.wants/getty at tty1.service ->
../../../../usr/lib/systemd/system/getty at .service

However i've found that the target of the symlink does not matter, and
thus symlinks to /dev/null in .wants directory enable the
dependencies.

One can experiment with just dummy foo.target and bar.target in
/etc/systemd/system.

Similarly I've tried adding .d snippet with "Wants=!unwanted.service"
but that only failed to load the snippet...

So, is there a way to unwant something, as an override?

-- 
Regards,

Dimitri.

Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ.


More information about the systemd-devel mailing list