From f678660f04a5e82358ee4d756bb3de141ccaedb1 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 26 Jul 2007 16:30:05 +0000 Subject: Fix bootmisc stopping for pam_console and write halt record correctly. --- init.d/bootmisc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.d/bootmisc b/init.d/bootmisc index f0508f59..96024eba 100755 --- a/init.d/bootmisc +++ b/init.d/bootmisc @@ -132,13 +132,13 @@ start() { stop() { # Reset pam_console permissions if we are actually using it - if [ -x /sbin/pam_console_apply -a ! -c /dev/.devfsd ] && \ - [ -n $(grep -v -e '^[[:space:]]*#' /etc/pam.d/* | grep 'pam_console') ] ; then + if [ -x /sbin/pam_console_apply ] && ! [ -c /dev/.devfsd ] ; then + if grep -v -e '^[[:space:]]*#' /etc/pam.d/* | grep -q 'pam_console.so' ; then /sbin/pam_console_apply -r fi # Write a halt record if we're shutting down - case "${SOFTLEVEL}" in + case "${RC_SOFTLEVEL}" in reboot|shutdown) [ "${RC_UNAME}" = "Linux" ] && halt -w ;; -- cgit v1.2.3