summaryrefslogtreecommitdiff
path: root/skel/rc.shutdown
diff options
context:
space:
mode:
Diffstat (limited to 'skel/rc.shutdown')
-rwxr-xr-xskel/rc.shutdown17
1 files changed, 17 insertions, 0 deletions
diff --git a/skel/rc.shutdown b/skel/rc.shutdown
new file mode 100755
index 0000000..d72916e
--- /dev/null
+++ b/skel/rc.shutdown
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+### Things to do before hardware halt/reboot/poweroff.
+### Ideally, it should be a single call to the service manager,
+### telling it to bring all the services down.
+
+### If your services are managed by sysv-rc:
+### also remove the K11reboot link from /etc/rc6.d to prevent
+### sysv-rc from rebooting prematurely - because sysvinit does
+### not properly separate state changes from system init/shutdown.
+# exec /etc/init.d/rc 6
+
+### If your services are managed by OpenRC:
+# exec /sbin/openrc shutdown
+
+### If your services are managed by s6-rc:
+# exec s6-rc -bda change