| … | |
… | |
| 193 | fi |
193 | fi |
| 194 | else |
194 | else |
| 195 | runlevelidxs="unused" |
195 | runlevelidxs="unused" |
| 196 | fi |
196 | fi |
| 197 | |
197 | |
|
|
198 | if [[ -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 |
|
|
203 | else |
|
|
204 | boot_crit="checkroot hostname modules checkfs localmount clock" |
|
|
205 | fi |
|
|
206 | |
| 198 | for level in ${runlevelidxs} ; do |
207 | for 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 |
| 215 | done |
229 | done |