summaryrefslogtreecommitdiff
path: root/layout/rootfs/etc/rc.shutdown
blob: 9689fe9e8fe06d5900d810f00861bdd1e4732f4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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