aboutsummaryrefslogtreecommitdiff
path: root/extra/sinit/files/sinit.post.shutdown
diff options
context:
space:
mode:
Diffstat (limited to 'extra/sinit/files/sinit.post.shutdown')
-rw-r--r--extra/sinit/files/sinit.post.shutdown16
1 files changed, 16 insertions, 0 deletions
diff --git a/extra/sinit/files/sinit.post.shutdown b/extra/sinit/files/sinit.post.shutdown
new file mode 100644
index 00000000..16deba74
--- /dev/null
+++ b/extra/sinit/files/sinit.post.shutdown
@@ -0,0 +1,16 @@
+# vim:filetype=sh
+
+# We handle the shutdown from here
+
+if [ "$SINIT_SHUTDOWN_HOOKS" = 1 ]; then
+ case "$1" in
+ reboot)
+ out "Requesting system reboot..."
+ /usr/bin/ubase-box halt -r
+ ;;
+ poweroff)
+ out "Requesting system poweroff..."
+ /usr/bin/ubase-box halt -p
+ ;;
+ esac
+fi