Files
linuxkit/pkg/init/bin/rc.shutdown
Justin Cormack 08e211df44 Use the sinit conventions for init
This should make it easier to switch out `init` for other versions,
although the `getty` config still needs to be removed.

- use `/bin/rc.init` for start
- use `rc.shutdown` for stop
- make `rc.init` run other code.
- merge `containers` and `containerd` startup code

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-30 14:14:34 +01:00

14 lines
211 B
Bash
Executable File

#!/bin/sh
[ "$1" = "reboot" ] && exec /sbin/reboot
# poweroff
/usr/sbin/killall5 -15
/bin/sleep 5
/usr/sbin/killall5 -9
/sbin/swapoff -a
/bin/echo "Unmounting filesystems"
/bin/umount -a -r
/sbin/poweroff -f