Bug 1319641

Summary: systemctl prints notifications on stderr
Product: Red Hat Enterprise Linux 7 Reporter: Filip Kroupa <krofi01>
Component: systemdAssignee: systemd-maint
Status: CLOSED WORKSFORME QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.2CC: systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-15 06:11:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Filip Kroupa 2016-03-21 09:03:34 UTC
Description of problem:
Enabling service using 'systemctl enable <servicename>' yields confirmation message "Created symlink from <location1> to <location2>". This confirmation message is not printed on stdout, but on stderr. This is a problem since it creates unwanted output on stderr if 'systemctl enable <servicename>' is part of service installation script.


How reproducible:
It is always reproducible


Steps to Reproduce:
(service being enabled must be previously disabled to see the confirmation message 'systemctl disable <service name>')
1. run 'systemctl enable <service name> 1>/dev/null'
2. prints "Created symlink from <location1> to <location2>" => it's printed on stderr

(service being enabled must be previously disabled to see the confirmation message 'systemctl disable <service name>')
1. run 'systemctl enable <service name> 2>/dev/null'
2. prints nothing => message was on stderr


Expected results:
I expect the confirmation to be printed on stdout

Comment 2 Lukáš Nykrýn 2016-03-21 12:01:58 UTC
--quiet ?

Comment 3 Filip Kroupa 2016-03-21 12:24:22 UTC
(In reply to Lukáš Nykrýn from comment #2)
> --quiet ?

Well that's not the point. I'm not asking how to hide the output. I'm trying to point out that this particular message should be printed on standard output and it pollutes error output.
Anyway I would not be able to pass any arguments to the systemctl command, I'm in no conrol of the script which calls it. All I do is process the stdout and stderr.

Comment 4 Lukáš Nykrýn 2016-04-15 06:11:25 UTC
I would say that this is correct behavior, the output is more a status message and it should not be process by a pipe with some additional program.

If you really think that this behavior should change, please file an upstream issue github.com/systemd/systemd/issues.