* Kill all processes during shutdown so that we can unmount
filesystems cleanly. svn path=/nixos/trunk/; revision=7930
This commit is contained in:
parent
454716ef4f
commit
a17b1d5c5f
|
@ -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' \\
|
||||
|
|
Loading…
Reference in New Issue