diff options
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-x | rc.shutdown | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rc.shutdown b/rc.shutdown index e2a4a84..5921e1c 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -6,6 +6,8 @@ . /etc/rc.conf . /etc/rc.d/functions +run_hook start rc.shutdown + # avoid staircase effect /bin/stty onlcr @@ -41,6 +43,8 @@ if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then done fi +run_hook prekillall rc.shutdown + # Terminate all processes stat_busy "Sending SIGTERM To Processes" /sbin/killall5 -15 &> /dev/null @@ -52,6 +56,8 @@ stat_busy "Sending SIGKILL To Processes" /bin/sleep 1 stat_done +run_hook postkillall rc.shutdown + stat_busy "Saving Random Seed" RANDOM_SEED=/var/lib/misc/random-seed [ -d $(dirname $RANDOM_SEED) ] || mkdir -p $(dirname $RANDOM_SEED) @@ -132,6 +138,8 @@ stat_busy "Remounting Root Filesystem Read-only" /bin/mount -n -o remount,ro / stat_done +run_hook poweroff rc.shutdown + # Power off or reboot if [ "$RUNLEVEL" = "0" ]; then printsep |