http://bugzilla.suse.com/show_bug.cgi?id=1090785
http://bugzilla.suse.com/show_bug.cgi?id=1090785#c13
--- Comment #13 from Tejas Guruswamy
(In reply to Tejas Guruswamy from comment #10)
so combined --user --global is actually an options clash (last option takes priority, so we've been getting away with it in the macros).
Hmm I'm not sure.
"--user --global" or "--global --user" or "--global" should ask for the same thing: operate on the global *user* configuration directory.
The clash would be if "--global" is used with "--system", no ?
This error exists in the upstream systemd-rpm-macros code. I have filed https://github.com/systemd/systemd/issues/9027.
Let's see what upstream will answer.
In my tests I find --global appears to have the same effect as --user for systemctl status (connect to user bus; cannot run as root). But they are different for enable/disable, preset, and is-enabled (at least). For one thing --user cannot run as superuser (cannot connect to bus), and of course --global must run as superuser if making changes. Also I have not figured out where --user preset is getting its config (it is not the global presets). To summarise it appears there is a difference in the treatment of --user and --global between systemctl commands which only query the running daemon (two options are same) and commands which operate on config directly (two options are different). Examples:
sudo systemctl --user --global preset redshift.service Created symlink from /etc/systemd/user/default.target.wants/redshift.service to /usr/lib/systemd/user/redshift.service. systemctl --global --user preset redshift.service Created symlink from ~/.config/systemd/user/default.target.wants/redshift.service to /usr/lib/systemd/user/redshift.service. sudo systemctl --user --global disable redshift.service Removed symlink /etc/systemd/user/default.target.wants/redshift.service. sudo systemctl --global --user disable redshift.service Failed to connect to bus: No such file or directory systemctl --global --user disable redshift.service Removed symlink ~/.config/systemd/user/default.target.wants/redshift.service.
As you say, we can wait for clarification from upstream. Thanks for your help. -- You are receiving this mail because: You are on the CC list for the bug.