Bug 83110

Summary: systemctl enable does not work for template units with no instance specified
Product: systemd Reporter: Ivan Shapovalov <intelfx100>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Ivan Shapovalov 2014-08-26 20:07:06 UTC
Given a templated unit, sometimes it can make sense to enable it with empty instance.

Actually, this seems to be a regression.

Example of bug:

$ cat .config/systemd/user/compton@.service 
.include need-session@.service

[Unit]
Description=Compton X11 compositor for session %I
Documentation=man:compton(1)

[Service]
Type=forking
ExecStart=/usr/bin/compton -f -b

[Install]
WantedBy=graphic@.target

$ systemctl --user disable compton@
Removed symlink /home/intelfx/.config/systemd/user/graphic@.target.wants/compton@.service.

$ systemctl --user enable compton@
<empty output>

Expected reaction:
- symlink created again
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-08-27 01:39:35 UTC
Indeed, this seems to be regression.
Comment 2 Lennart Poettering 2016-06-07 13:05:30 UTC
This should work again. if it does not, please file a new bug on github! Thanks!

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.