diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-05-22 21:56:04 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-05-22 21:56:04 +0000 |
commit | 82d0f92ab8b84466ae20ab919c1f9c3577b5cecb (patch) | |
tree | 776015ae6c6a386125b2d39e13b62f91b99548f8 /layout/rootfs/etc/rc.shutdown | |
download | lh-bootstrap-82d0f92ab8b84466ae20ab919c1f9c3577b5cecb.tar.xz |
Initial commit
Diffstat (limited to 'layout/rootfs/etc/rc.shutdown')
-rwxr-xr-x | layout/rootfs/etc/rc.shutdown | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/layout/rootfs/etc/rc.shutdown b/layout/rootfs/etc/rc.shutdown new file mode 100755 index 0000000..9689fe9 --- /dev/null +++ b/layout/rootfs/etc/rc.shutdown @@ -0,0 +1,21 @@ +#!/command/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 } +foreground { s6-sleep 2 } +foreground { s6-echo "Sending all processes the KILL signal." } +foreground { s6-nuke -k } +wait { } + +foreground { s6-echo "Syncing and unmounting disks." } +foreground { s6-sync } + +foreground { s6-umount -a } +foreground { s6-mount -ro remount /dev/root / } + +foreground { s6-echo "\nPerforming "${1}"." } +s6-${1} -f |