aboutsummaryrefslogtreecommitdiff
path: root/rc.shutdown
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2009-08-26 23:26:54 +0200
committerThomas Bächler <thomas@archlinux.org>2009-08-26 23:26:54 +0200
commit58fc27aaeb6d7d67cdf93997a33e0cbe4b5d7ada (patch)
tree05e9c2df6176d3f679739b7a25d047478ee6de32 /rc.shutdown
parentcfabb85924f35c636550609b332d088aaae9941f (diff)
downloadinitscripts-58fc27aaeb6d7d67cdf93997a33e0cbe4b5d7ada.tar.xz
Make the hook-system a bit more usable
This patch makes the hook names unique, prefixing them all with the script name (without the 'rc.') It also removes the explicit declarations of all elements of the array, bash assumes "" if they are uninitialized
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-xrc.shutdown8
1 files changed, 4 insertions, 4 deletions
diff --git a/rc.shutdown b/rc.shutdown
index 5921e1c..34442ca 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -6,7 +6,7 @@
. /etc/rc.conf
. /etc/rc.d/functions
-run_hook start rc.shutdown
+run_hook shutdown_start
# avoid staircase effect
/bin/stty onlcr
@@ -43,7 +43,7 @@ if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
done
fi
-run_hook prekillall rc.shutdown
+run_hook shutdown_prekillall
# Terminate all processes
stat_busy "Sending SIGTERM To Processes"
@@ -56,7 +56,7 @@ stat_busy "Sending SIGKILL To Processes"
/bin/sleep 1
stat_done
-run_hook postkillall rc.shutdown
+run_hook shutdown_postkillall
stat_busy "Saving Random Seed"
RANDOM_SEED=/var/lib/misc/random-seed
@@ -138,7 +138,7 @@ stat_busy "Remounting Root Filesystem Read-only"
/bin/mount -n -o remount,ro /
stat_done
-run_hook poweroff rc.shutdown
+run_hook shutdown_poweroff
# Power off or reboot
if [ "$RUNLEVEL" = "0" ]; then