Hi! On Sun, Oct 01, 2006 at 02:19:36PM -0600, Vincent Danen wrote: > Am I doing something wrong? Yep. sv work correctly. But you must kill runsvdir first. If you 'exit' runsv without killing runsvdir, then runsvdir will restart runsv, then runsv will restart service which isn't what you want in /etc/runit/3. ;-) > My stage 3 script looks like this: My stage 3 script start with some fd redirection and log initialization, then: # 1) Send TERM to (all - some users on my servers also run it) runsvdir # to force it exit immediately. # 2) Send TERM to all runsv (same as `sv exit`). # 3) Send TERM to all services (so services will receive 2 TERM signals - # one from their runsv and one from this command, but this is harmless). # 4) Send TERM to all other processes, not monitored by runsv. killall5 -15 # 1) Gracefully wait up to 7 seconds until all services will be down before # continue shutdown process. # 2) I'm not sure, but may also send KILL to hang services - not sure # because runsv already asked to 'exit' by previous command. sv force-stop /var/service/* &>/dev/null and after these commands shutdown continues: saving sound mixer state, down network interfaces, adding reboot record to wtmp, killall5 -9 (just for the case), and unmount everything. -- WBR, Alex.