/[vps]/baselayout-vserver/trunk/bin/rc-status
Gentoo

Diff of /baselayout-vserver/trunk/bin/rc-status

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 64 Revision 65
193 fi 193 fi
194else 194else
195 runlevelidxs="unused" 195 runlevelidxs="unused"
196fi 196fi
197 197
198if [[ -f "/etc/runlevels/${BOOTLEVEL}/.critical" ]]; then
199 boot_crit=
200 for x in $(< /etc/runlevels/${BOOTLEVEL}/.critical); do
201 boot_crit="${boot_crit} ${x##*/}"
202 done
203else
204 boot_crit="checkroot hostname modules checkfs localmount clock"
205fi
206
198for level in ${runlevelidxs} ; do 207for level in ${runlevelidxs} ; do
199 echo "Runlevel: ${HILITE}${level}${NORMAL}" 208 echo "Runlevel: ${HILITE}${level}${NORMAL}"
200 for service in ${runlevels[${arridx}]} ; do 209 for service in ${runlevels[${arridx}]} ; do
210 if [[ ! -e ${runleveldir}/${level}/${service} \
211 && ${level} != "UNASSIGNED" \
212 && ${level} != "${BOOTLEVEL}" \
213 && " ${boot_crit} " != *" ${service} " ]]; then
214 print_msg "${service}" "${BAD}" 'broken '
201 if [[ -n ${inactive} && $(in_list "${inactive}" "${service}") -eq 1 ]] ; then 215 elif [[ -n ${inactive} && $(in_list "${inactive}" "${service}") -eq 1 ]] ; then
202 print_msg "${service}" "${WARN}" 'inactive' 216 print_msg "${service}" "${WARN}" 'inactive'
203 elif [[ $(in_list "${started}" "${service}") -eq 1 ]] ; then 217 elif [[ $(in_list "${started}" "${service}") -eq 1 ]] ; then
204 print_msg "${service}" "${GOOD}" 'started' 218 print_msg "${service}" "${GOOD}" 'started '
205 elif [[ -n ${starting} && $(in_list "${starting}" "${service}") -eq 1 ]] ; then 219 elif [[ -n ${starting} && $(in_list "${starting}" "${service}") -eq 1 ]] ; then
206 print_msg "${service}" "${GOOD}" 'starting' 220 print_msg "${service}" "${GOOD}" 'starting'
207 elif [[ -n ${stopping} && $(in_list "${stopping}" "${service}") -eq 1 ]] ; then 221 elif [[ -n ${stopping} && $(in_list "${stopping}" "${service}") -eq 1 ]] ; then
208 print_msg "${service}" "${BAD}" 'stopping' 222 print_msg "${service}" "${BAD}" 'stopping'
209 else 223 else
210 print_msg "${service}" "${BAD}" 'stopped' 224 print_msg "${service}" "${BAD}" 'stopped '
211 fi 225 fi
212 done 226 done
213 let "arridx += 1" 227 let "arridx += 1"
214 [ -n "${UNUSED}" ] && exit 0 228 [ -n "${UNUSED}" ] && exit 0
215done 229done

Legend:
Removed from v.64  
changed lines
  Added in v.65

  ViewVC Help
Powered by ViewVC 1.1.20