aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorVáclav Pavlín <vpavlin@redhat.com>2012-08-01 14:27:40 +0200
committerLukas Nykryn <lnykryn@redhat.com>2012-08-07 10:01:57 +0200
commit250820f3a255837df814d89711b10b222a4b596c (patch)
tree8bd583d86b51acc2b74fffba8469ba9a62dcaf2f /rc.d
parent1bd5b5804e58b8f102f725ce84412fc58e3c5b06 (diff)
downloadinitscripts-250820f3a255837df814d89711b10b222a4b596c.tar
initscripts-250820f3a255837df814d89711b10b222a4b596c.tar.gz
initscripts-250820f3a255837df814d89711b10b222a4b596c.tar.bz2
initscripts-250820f3a255837df814d89711b10b222a4b596c.tar.xz
initscripts-250820f3a255837df814d89711b10b222a4b596c.zip
Pass useful arguments to halt.local (#554392)
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/halt7
1 files changed, 4 insertions, 3 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 2ebdbbe3..3ddaa73d 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -162,8 +162,11 @@ awk '$2 !~ /\/(|dev|proc|selinux|sys)$/ && $1 !~ /^\/dev\/ram/ { print $2 }' \
fstab-decode $UMOUNT -f $line
done
+HALTARGS="-d"
+[ "$INIT_HALT" != "HALT" ] && HALTARGS="$HALTARGS -p"
+
if [ -x /sbin/halt.local ]; then
- /sbin/halt.local
+ /sbin/halt.local "$message" "$command" "$HALTARGS" "$kexec_command"
fi
# Tell init to re-exec itself.
@@ -207,7 +210,5 @@ fi
# First, try kexec. If that fails, fall back to rebooting the old way.
[ -n "$kexec_command" ] && $kexec_command -e -x >& /dev/null
-HALTARGS="-d"
-[ "$INIT_HALT" != "HALT" ] && HALTARGS="$HALTARGS -p"
exec $command $HALTARGS