summaryrefslogtreecommitdiff
path: root/examples/rc.shutdown
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-07-17 13:31:20 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-07-17 13:31:20 +0000
commit17c03cf8f0a6339d78ad8fb968ef3b999d658034 (patch)
treee9c5d8596ebe30216d916943fb7ef8c99ad7f0c6 /examples/rc.shutdown
parent602e835f5afd57cc8659e78f28034e1a2d362248 (diff)
downloads6-linux-init-17c03cf8f0a6339d78ad8fb968ef3b999d658034.tar.xz
Import /etc/rc.[init tini shutdown] examples from lh-bootstrap
Diffstat (limited to 'examples/rc.shutdown')
-rwxr-xr-xexamples/rc.shutdown9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/rc.shutdown b/examples/rc.shutdown
index 18c898b..04d7357 100755
--- a/examples/rc.shutdown
+++ b/examples/rc.shutdown
@@ -1,19 +1,20 @@
#!/bin/execlineb -S0
+foreground { s6-echo "Giving dying processes some grace time." }
+foreground { s6-sleep 2 }
foreground { s6-echo "Syncing disks." }
foreground { s6-sync }
foreground { s6-echo "Sending all processes the TERM signal." }
foreground { s6-nuke -th }
-s6-sleep 2
+foreground { s6-sleep 2 }
foreground { s6-echo "Sending all processes the KILL signal." }
foreground { s6-nuke -k }
wait { }
-foreground { s6-echo "Syncing disks." }
+foreground { s6-echo "Syncing and unmounting disks." }
foreground { s6-sync }
-foreground { s6-echo "Unmounting disks." }
foreground { s6-umount -a }
-foreground { s6-mount -o ro,remount /dev/root / }
+foreground { s6-mount -ro remount /dev/root / }
foreground { s6-echo "\nPerforming "${1}"." }
s6-${1} -f