Bug 86076 - Cannot enable a `systemctl link`-ed unit
Summary: Cannot enable a `systemctl link`-ed unit
Status: RESOLVED WONTFIX
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-09 20:03 UTC by Ivan Shapovalov
Modified: 2016-06-07 13:02 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Ivan Shapovalov 2014-11-09 20:03:34 UTC
Attempt to enable a unit which has been symlinked into the search path by `systemctl link` produces the following error message:
"Failed to execute operation: No such file or directory."

Also the `systemctl link` itself generates a warning-level message in the log:
"Unknown serialization item 'subscribed=:1.1'"

$ cat /test.service 
[Unit]
Description=Test service

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

[Install]
WantedBy=multi-user.target

$ sudo systemctl link /test.service 
Created symlink from /etc/systemd/system/test.service to /test.service.

$ sudo systemctl enable test.service
Failed to execute operation: No such file or directory

$ journalctl -n1 _PID=1 -p warning
-- Logs begin at Ср 2014-10-15 14:29:58 MSK, end at Вс 2014-11-09 23:00:11 MSK. --
ноя 09 23:00:07 intelfx-laptop systemd[1]: Unknown serialization item 'subscribed=:1.1'
Comment 1 Alexandre Detiste 2014-12-03 12:19:52 UTC
This may have alreayd been fixed here (2014-11-24):

http://comments.gmane.org/gmane.comp.sysutils.systemd.devel/25236
Comment 2 Ivan Shapovalov 2014-12-03 12:40:02 UTC
Actually, the "Unknown serialization item ..." error is unrelated. It has been fixed, but not the real bug with `systemctl link`.
Comment 3 Lennart Poettering 2016-06-07 13:02:58 UTC
This is really on purpose as we don't want to follow configuration to remove/create configuration. You may however use "systemctl enable" directly on the full unit file path.


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.