]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Added some actions to the upstart shutdown job.
authorStefan Schantl <Stevee@ipfire.org>
Tue, 25 Aug 2009 20:35:14 +0000 (22:35 +0200)
committerStefan Schantl <Stevee@ipfire.org>
Tue, 25 Aug 2009 20:35:14 +0000 (22:35 +0200)
src/initscripts/core/shutdown.conf

index 394b2274636e58ed9bef1b58150b87a2b0ad3079..625614459e7978cd0f0df8d76b8152a8c72a4467 100644 (file)
@@ -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