summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2005-11-07 19:00:12 +0000
committerChristian Heim <phreak@gentoo.org>2005-11-07 19:00:12 +0000
commit9ca7e2f8008eb09e604e6dff04d41fb234e4df3a (patch)
tree11c4bc371a9c56d21eaf4943c03ea96b1241f2a4 /bin
parentMerging changes between baselayout r1583 and r1596. (diff)
downloadbaselayout-vserver-9ca7e2f8008eb09e604e6dff04d41fb234e4df3a.tar.gz
baselayout-vserver-9ca7e2f8008eb09e604e6dff04d41fb234e4df3a.tar.bz2
baselayout-vserver-9ca7e2f8008eb09e604e6dff04d41fb234e4df3a.zip
Merging uberlord's latest changes of baselayout (r1599).
svn path=/baselayout-vserver/trunk/; revision=65
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rc-status20
1 files changed, 17 insertions, 3 deletions
diff --git a/bin/rc-status b/bin/rc-status
index 3450ba0..81b09eb 100755
--- a/bin/rc-status
+++ b/bin/rc-status
@@ -195,19 +195,33 @@ else
runlevelidxs="unused"
fi
+if [[ -f "/etc/runlevels/${BOOTLEVEL}/.critical" ]]; then
+ boot_crit=
+ for x in $(< /etc/runlevels/${BOOTLEVEL}/.critical); do
+ boot_crit="${boot_crit} ${x##*/}"
+ done
+else
+ boot_crit="checkroot hostname modules checkfs localmount clock"
+fi
+
for level in ${runlevelidxs} ; do
echo "Runlevel: ${HILITE}${level}${NORMAL}"
for service in ${runlevels[${arridx}]} ; do
- if [[ -n ${inactive} && $(in_list "${inactive}" "${service}") -eq 1 ]] ; then
+ if [[ ! -e ${runleveldir}/${level}/${service} \
+ && ${level} != "UNASSIGNED" \
+ && ${level} != "${BOOTLEVEL}" \
+ && " ${boot_crit} " != *" ${service} " ]]; then
+ print_msg "${service}" "${BAD}" 'broken '
+ elif [[ -n ${inactive} && $(in_list "${inactive}" "${service}") -eq 1 ]] ; then
print_msg "${service}" "${WARN}" 'inactive'
elif [[ $(in_list "${started}" "${service}") -eq 1 ]] ; then
- print_msg "${service}" "${GOOD}" 'started'
+ print_msg "${service}" "${GOOD}" 'started '
elif [[ -n ${starting} && $(in_list "${starting}" "${service}") -eq 1 ]] ; then
print_msg "${service}" "${GOOD}" 'starting'
elif [[ -n ${stopping} && $(in_list "${stopping}" "${service}") -eq 1 ]] ; then
print_msg "${service}" "${BAD}" 'stopping'
else
- print_msg "${service}" "${BAD}" 'stopped'
+ print_msg "${service}" "${BAD}" 'stopped '
fi
done
let "arridx += 1"