From e00d2c4d88c90ccc6d091bde07d412936f8886d3 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 13 Oct 2015 16:05:05 +0000 Subject: - added stage2_finish support - s6 dep bumped to 2.2.2.0 --- examples/rc.shutdown | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 examples/rc.shutdown (limited to 'examples/rc.shutdown') diff --git a/examples/rc.shutdown b/examples/rc.shutdown new file mode 100755 index 0000000..5589903 --- /dev/null +++ b/examples/rc.shutdown @@ -0,0 +1,19 @@ +#!/bin/execlineb -S0 + +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-echo "Sending all processes the KILL signal." } +foreground { s6-nuke -k } +wait { } + +foreground { s6-echo "Syncing disks." } +foreground { s6-sync } +foreground { s6-echo "Unmounting disks." } +foreground { s6-umount -a } +foreground { s6-mount -o ro,remount /dev/root / } + +foreground { s6-echo "\nPerforming "${1}"." } +s6-${1} -- cgit v1.2.3