diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-10-13 16:05:05 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-10-13 16:05:05 +0000 |
commit | e00d2c4d88c90ccc6d091bde07d412936f8886d3 (patch) | |
tree | 21ccec11c0b36dab9f3284a311193821b3dfc700 /examples | |
parent | 49352128c1a9dfc15a4bd29530d68a4b241909e6 (diff) | |
download | s6-linux-init-e00d2c4d88c90ccc6d091bde07d412936f8886d3.tar.xz |
- added stage2_finish support
- s6 dep bumped to 2.2.2.0
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/rc.init | 4 | ||||
-rwxr-xr-x | examples/rc.shutdown | 19 | ||||
-rwxr-xr-x | examples/rc.tini | 3 |
3 files changed, 26 insertions, 0 deletions
diff --git a/examples/rc.init b/examples/rc.init new file mode 100755 index 0000000..e0b2b72 --- /dev/null +++ b/examples/rc.init @@ -0,0 +1,4 @@ +#!/bin/execlineb -P + +if { s6-rc-init /run/service } +s6-rc -u change ok-all 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} diff --git a/examples/rc.tini b/examples/rc.tini new file mode 100755 index 0000000..abefb22 --- /dev/null +++ b/examples/rc.tini @@ -0,0 +1,3 @@ +#!/bin/execlineb -P + +s6-rc -da change |