Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 158281

Summary: rc-status should sort output alphabetically (like "rc-update show" does)
Product: Gentoo Linux Reporter: Wolfram Schlich (RETIRED) <wschlich>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Wolfram Schlich (RETIRED) gentoo-dev 2006-12-16 05:20:29 UTC
baselayout version: sys-apps/baselayout-1.12.4-r7

The output of "rc-status" is unsorted by default.
I think it should be sorted, just like the output of "rc-update show".
Comment 1 SpanKY gentoo-dev 2006-12-16 10:18:57 UTC
fixed with this:

--- branches/baselayout-1_12/bin/rc-status      (revision 2425)
+++ branches/baselayout-1_12/bin/rc-status      (working copy)
@@ -121,7 +121,7 @@ declare -a runlevels
 arridx=0
 for level in ${runlevelidxs} ; do
        if [[ ${level} == ${runlevel} || -n ${ALL} ]] ; then
-               runlevels[${arridx}]=$(find ${runleveldir}/${level} -maxdepth 1 -type l -printf '%f ')
+               runlevels[${arridx}]=$(find ${runleveldir}/${level} -maxdepth 1 -type l -printf '%f\n' | sort)
                let "arridx += 1"
        fi
 done
Comment 2 Wolfram Schlich (RETIRED) gentoo-dev 2006-12-16 11:30:00 UTC
Thanks! :o)