Bug 46084 - systemctl enable/disable outputs on STDERR
Summary: systemctl enable/disable outputs on STDERR
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-14 23:50 UTC by Brian D. Burns
Modified: 2012-03-13 18:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Brian D. Burns 2012-02-14 23:50:06 UTC
When using the systemctl enable/disable commands to create/remove symlinks, the action performed is being output on STDERR.

For example, if I issue:
$ systemctl enable user-6789.socket
I will get this output on STDERR:
ln -s '/lib/systemd/system/user-6789.socket' '/etc/systemd/system/sockets.target.wants/user-6789.socket'

The same happens with disable. I get this on STDERR:
rm '/etc/systemd/system/sockets.target.wants/user-6789.socket'

Using the '-q' option does not change anything.

Note that even though the output is on STDERR, the exitstatus is 0.

Also, if either command is re-issued, exitstatus is 0 and there is no output at all. 
i.e. if the symlink already exists, and 'enable' is called again. or 'disable' is called when no link exists.
This seemed odd, considering there is a '--force/-f' option.

System Info:
Linux 3.2.5-3.fc16.i686 #1 SMP Thu Feb 9 02:24:08 UTC 2012 i386
systemd-37-11.fc16.i686
$ systemctl --version
systemd 37
fedora
+PAM +LIBWRAP +AUDIT +SELINUX +SYSVINIT +LIBCRYPTSETUP
Comment 1 Lennart Poettering 2012-03-13 18:58:12 UTC
In either 41, or 42 we made sure that -q actually causes this output to be suppressed.

Note that logging always happens to stderr (i.e. in contrast to what the name suggests, it's not just for actual errors but also for all kinds of other progress information, that is not actual payload).

Anyway, I think there's nothing to fix here really now that -q can be used to turn the output off.


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.