From 58fc27aaeb6d7d67cdf93997a33e0cbe4b5d7ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?= Date: Wed, 26 Aug 2009 23:26:54 +0200 Subject: 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 --- rc.shutdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rc.shutdown') 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 -- cgit v1.2.3