Fix bootmisc stopping for pam_console and write halt record correctly.

This commit is contained in:
Roy Marples 2007-07-26 16:30:05 +00:00
parent 075e80b358
commit f678660f04

View File

@ -132,13 +132,13 @@ start() {
stop() { stop() {
# Reset pam_console permissions if we are actually using it # Reset pam_console permissions if we are actually using it
if [ -x /sbin/pam_console_apply -a ! -c /dev/.devfsd ] && \ if [ -x /sbin/pam_console_apply ] && ! [ -c /dev/.devfsd ] ; then
[ -n $(grep -v -e '^[[:space:]]*#' /etc/pam.d/* | grep 'pam_console') ] ; then if grep -v -e '^[[:space:]]*#' /etc/pam.d/* | grep -q 'pam_console.so' ; then
/sbin/pam_console_apply -r /sbin/pam_console_apply -r
fi fi
# Write a halt record if we're shutting down # Write a halt record if we're shutting down
case "${SOFTLEVEL}" in case "${RC_SOFTLEVEL}" in
reboot|shutdown) reboot|shutdown)
[ "${RC_UNAME}" = "Linux" ] && halt -w [ "${RC_UNAME}" = "Linux" ] && halt -w
;; ;;