Bug 38922 - masked unit no longer honored in .wants directory
Summary: masked unit no longer honored in .wants directory
Status: RESOLVED NOTABUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-02 18:05 UTC by Dave Reisner
Modified: 2011-07-03 06:01 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Dave Reisner 2011-07-02 18:05:30 UTC
systemd no longer seems to honor my masked media.mount unit. I've added a symlink to /dev/null in:

  /etc/systemd/system/local-fs.target.wants/

to match the media.mount symlink in

  /lib/systemd/system/local-fs.target.wants/

This worked previously, in systemd 28, with only this symlink in /etc/systemd/system/local-fs.target.wants. With the latest code from git master, the behavior is changed. With only this symlink, systemctl will show the unit as loaded from /lib/systemd/system/media.mount.

If I move the symlink down to /etc/system/system/media.mount, then the unit then shows as masked, but I start seeing periodic errors in my syslog, such as:

  Jun 29 18:58:43 localhost systemd[1]: Cannot add dependency job for unit media.mount, ignoring: Unit media.mount is masked.

If I then add back in the original symlink, the errors go away from my syslog and the unit is still masked.

It doesn't seem correct that I should have to add the symlink in both places in order to have this quietly masked.
Comment 1 Lennart Poettering 2011-07-03 06:01:14 UTC
This is a misunderstanding: you can mask services, not dependencies. You need to place the /dev/null symlink in /etc/systemd/system, not in any of its subdirectories. If you place it in a subdirectory systemd might or might not see that and that's undefined.

See http://0pointer.de/blog/projects/three-levels-of-offfor details.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.