This is very unintuitive.
e.g.
When a user tries to:
# service --status-all | grep postgres
This won't work…
The only way to grep `service' is:
# service --status-all 2>&1 | grep postgres
On Gentoo Linux for example this problem does not occur:
# rc-status | grep postgres
will work fine.
Best Answer
It might sound a bit strange but it does not. To be more exact, it displays only unknown
[?]
statuses on the standard error (besides other error messages).You can see the script in
/usr/sbin/services
. The relevant part is the following (lines 68--98):The
echo " [ + ] $SERVICE"
line does not print to standard error, and so the[ - ]
variant.You can easily test the above assumption by running:
services --status-all 2>/dev/null
. If you have any running service that supports the status command, it will be listed.