* Kill all processes during shutdown so that we can unmount

filesystems cleanly.

svn path=/nixos/trunk/; revision=7930
This commit is contained in:
Eelco Dolstra 2007-02-20 15:51:13 +00:00
parent 454716ef4f
commit a17b1d5c5f

View File

@ -19,9 +19,22 @@ script
export PATH=${utillinux}/bin:${utillinux}/sbin:$PATH
# Do an initial sync just in case.
sync || true
# Kill all remaining processes except init and this one.
echo \"Sending the TERM signal to all processes...\"
kill -TERM -1
sleep 1 # wait briefly
echo \"Sending the KILL signal to all processes...\"
kill -KILL -1
# Unmount helper functions.
getMountPoints() {
cat /proc/mounts \\
| grep -v '^rootfs' \\