From: Stefan Schantl Date: Tue, 25 Aug 2009 20:35:14 +0000 (+0200) Subject: Added some actions to the upstart shutdown job. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c64cad5f751a4e942ad4eca4ea8289083d65472b;p=ipfire-3.x.git Added some actions to the upstart shutdown job. --- diff --git a/src/initscripts/core/shutdown.conf b/src/initscripts/core/shutdown.conf index 394b22746..625614459 100644 --- a/src/initscripts/core/shutdown.conf +++ b/src/initscripts/core/shutdown.conf @@ -6,10 +6,23 @@ start on shutdown or reboot console output script - # Some stuff for the shutdown / reboot process + # Exterminate any lil' process that managed to evade my merciless + # terminating. + initmsg msg "Sending all processes the SIGTERM signal" + killall5 -15 || true + initmsg ret $? "Sending all processes the SIGTERM signal" + + initmsg msg "Sending all processes the SIGKILL signal" + sleep 5 + killall5 -9 || true + initmsg ret $? "Sending all processes the SIGKILL signal" + + initmsg msg "Remounting root filesystem read-only" + mount -n -o remount,ro / || true + initmsg ret $? "Remount of the root filesystem read-only" - # The UPSTART_EVENTS variable contains the event that has called the - # script and is used to perform the requested action. + # The UPSTART_EVENTS variable contains the event that has been called. + # The script use it to perform the requested action. if [ "${UPSTART_EVENTS}" = "reboot" ]; then reboot -f else