summaryrefslogtreecommitdiff
path: root/layout/rootfs/etc/rc.shutdown
diff options
context:
space:
mode:
Diffstat (limited to 'layout/rootfs/etc/rc.shutdown')
-rwxr-xr-xlayout/rootfs/etc/rc.shutdown28
1 files changed, 11 insertions, 17 deletions
diff --git a/layout/rootfs/etc/rc.shutdown b/layout/rootfs/etc/rc.shutdown
index 9689fe9..ca63d14 100755
--- a/layout/rootfs/etc/rc.shutdown
+++ b/layout/rootfs/etc/rc.shutdown
@@ -1,21 +1,15 @@
-#!/command/execlineb -S0
+#!/command/execlineb -P
-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 { }
+# Write a message to /var/log/syslogd
-foreground { s6-echo "Syncing and unmounting disks." }
-foreground { s6-sync }
+foreground
+{
+ s6-ipcclient -l0 /dev/log
+ fdmove 1 7
+ s6-echo "/etc/rc.shutdown requested"
+}
-foreground { s6-umount -a }
-foreground { s6-mount -ro remount /dev/root / }
-foreground { s6-echo "\nPerforming "${1}"." }
-s6-${1} -f
+# Shut down all services
+
+s6-rc -da change