RE: Shutdown/reboot script order?

2015-06-09 Thread James Powell
Killall5 sometimes can leave some dangling processes. You may want to use pkill as an alternative or with killall5 after the killall5 sequence. pkill --inverse -s0,1 -TERM sleep 3 pkill --inverse -s0,1 -KILL sleep 3 This will collapse the entire process tree if any processes are left behind, es

Re: Shutdown/reboot script order?

2015-06-09 Thread post-sysv
This is indeed the generally correct order, though I think it's a bit too primitive for real-world shutdown on more dynamic systems, particularly desktops. It's good practice to touch /etc/nologin or /run/nologin, sync the dirty buffers to disk, turn off swap, detach loopback and volumes (Devic

Re: Shutdown/reboot script order?

2015-06-09 Thread Laurent Bercot
On 09/06/2015 16:24, Steve Litt wrote: * killall5 -15; sleep 2; killall5 -9; sleep 2 * umount -a * mount -o remount,ro /dev/sda1 * /sbin/halt or /sbin/reboot Could somebody confirm which order these things come in? You got the right order. Note that killall5 is heavy, kludgy and System V

Shutdown/reboot script order?

2015-06-09 Thread Steve Litt
Hi all, I know the last part of system shutdown or reboot, after I've killed my daemontools-supervised processes, has the following features: * killall5 -15; sleep 2; killall5 -9; sleep 2 * umount -a * mount -o remount,ro /dev/sda1 * /sbin/halt or /sbin/reboot Could somebody confirm which ord