From: Stefan Schantl Date: Sun, 23 Aug 2009 19:20:05 +0000 (+0200) Subject: Changed handling of shutdown / reboot events. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f6614be8d948b7fc932b048bd1f536d1080cf08;p=ipfire-3.x.git Changed handling of shutdown / reboot events. Now the shutdown job will be started on shutdown and reboot events. The UPSTSRT_EVENTS variable is used to determite the request and perform the action. --- diff --git a/src/initscripts/core/shutdown.conf b/src/initscripts/core/shutdown.conf index a0a3bbfa5..21d69d334 100644 --- a/src/initscripts/core/shutdown.conf +++ b/src/initscripts/core/shutdown.conf @@ -1,11 +1,19 @@ -description "Shutdown the system" +description "Shutdown or reboot the system" author "IPFire Team" +start on shutdown +start on reboot + console output -task -exec initctl emit --no-wait shutdown +script + # Some stuff for the shutdown / reboot process -post-stop script - poweroff -f + # The UPSTART_EVENTS variable contains the event that has called the + # script and is used to perform the requested action. + if [ "$UPSTART_EVENTS" -eq shutdown ]; then + poweroff -f + else + reboot -f + fi end script