Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 573134 - sys-apps/openrc: rc-status should sort init scripts
Summary: sys-apps/openrc: rc-status should sort init scripts
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-27 15:16 UTC by Patrick Lauer
Modified: 2016-02-01 23:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2016-01-27 15:16:41 UTC
The output of rc-status is very random, which makes it hard to see at one glance if a specific init script is started. Alphabetically sorting the output for each runlevel might make it more human-readable.

# rc-status
Runlevel: default hostname                                                                                                                                                                                                                                                         [  started  ]
 syslog-ng                                                                                                                                                                                                                                                        [  started  ]
 haveged                                                                                                                                                                                                                                                          [  started  ]
 iptables                                                                                                                                                                                                                                                         [  started  ]
 net.eno1                                                                                                                                                                                                                                                         [  started  ]
 net.eno2                                                                                                                                                                                                                                                         [  started  ]
 dnsmasq                                                                                                                                                                                                                                                          [  started  ]
 postfix                                                                                                                                                                                                                                                          [  started  ]
 vixie-cron                                                                                                                                                                                                                                                       [  started  ]
 microcode_ctl                                                                                                                                                                                                                                                    [  started  ]
 atd                                                                                                                                                                                                                                                              [  started  ]
 sshd                                                                                                                                                                                                                                                             [  started  ]
 netmount                                                                                                                                                                                                                                                         [  started  ]
 ntpd                                                                                                                                                                                                                                                             [  started  ]
 local                                                                                                                                                                                                                                                            [  started  ]
Comment 1 William Hubbs gentoo-dev 2016-01-27 22:01:14 UTC
rc-status displays the services in the order they would start, so it
isn't actually random.

The preferred way to get the status of a single service, if that
is what you are looking for, is

rc-service <svcname> status

Also, you can do something like this if you want to look it up with
rc-status

rc-status | grep <svcname>

Given that, I'm not sure whether it is worth the effort to sort the
output from rc-status.
Comment 2 William Hubbs gentoo-dev 2016-01-27 22:12:09 UTC
I will take a look and see if there is a way to sort them and make it an
option, but I don't want to change the default display order.
Comment 3 William Hubbs gentoo-dev 2016-02-01 23:37:20 UTC
First off, wontfix isn't really the most accurate resolution for this,
but it is the only one that makes sense.

I spent a good part of today looking at this code and running some
tests, and it appears that this will be an extensive rewrite of
rc-status for a very small, cosmetic gain, and I'm not really interested
in putting that much effort into it.

On the other hand, if you want to provide a patch or open a pull request
for this on github, I could probably be convinced to take it as long as
it doesn't break current behaviour.