mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-29 22:40:26 +00:00
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>
This commit is contained in:
13
pkg/init/bin/rc.shutdown
Executable file
13
pkg/init/bin/rc.shutdown
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user