Summary: | RFE: [Install] sections in drop-in files are ignored | ||
---|---|---|---|
Product: | systemd | Reporter: | rfnx.poubelle |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED FIXED | QA Contact: | systemd-bugs |
Severity: | normal | ||
Priority: | medium | CC: | freedesktop, rustybird+freedesktop.org |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
rfnx.poubelle
2014-02-17 16:25:14 UTC
Are you sure that it works at all? If I create a file like: $ cat /etc/systemd/system/depes.service [Service] ExecStart=/bin/depes [Install] WantedBy=multi-user.target $ systemctl show -p WantedBy,RequiredBy depes.service RequiredBy= WantedBy= Yes it works this way for me. In my case, I override the postgresql.service unit file in /usr/lib/systemd/system with the file I created /etc/systemd/system/postgresql.service : cat /etc/systemd/system/postgresql.service .include /usr/lib/systemd/system/postgresql.service [Unit] Before=dovecot.service [Install] RequiredBy=dovecot.service systemctl show -p RequiredBy,After postgresql.service RequiredBy=dovecot.service uwsgi@emperor.service After=network.target systemd-journald.socket basic.target system.slice ----- Did you do "systemctl daemon-reload" to ensure your unit file was read ? You can also try to disable the unit before creating the file then reenable it to make sure your file is loaded (you can verify this with "systemctl status unit" or "systemd-delta") This bug has bitten me too. I work around it by specifying the dependency from the other direction, replacing /etc/systemd/foo.service.d/my.conf: [Install] RequiredBy=bar.service with /etc/systemd/bar.service.d/my.conf: [Unit] Require=foo.service though now bar.service will pull in even a disabled foo.service, so it's not quite the same. Implemented now in PR #7158. Closing. |
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.