summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/system.inc8
-rwxr-xr-xetc/rc.halt6
-rwxr-xr-xetc/rc.reboot2
3 files changed, 15 insertions, 1 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index afd25c6..c6f2fee 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -448,6 +448,14 @@ function system_ntp_configure() {
echo "done\n";
}
+function system_halt() {
+ global $g;
+
+ system_reboot_cleanup();
+
+ mwexec("nohup /etc/rc.halt > /dev/null 2>&1 &");
+}
+
function system_reboot() {
global $g;
diff --git a/etc/rc.halt b/etc/rc.halt
new file mode 100755
index 0000000..40d6504
--- /dev/null
+++ b/etc/rc.halt
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+sleep 1
+
+/sbin/shutdown -h now
+
diff --git a/etc/rc.reboot b/etc/rc.reboot
index e3bc88c..3216c61 100755
--- a/etc/rc.reboot
+++ b/etc/rc.reboot
@@ -3,4 +3,4 @@
sleep 1
/sbin/shutdown -r now
-#/sbin/reboot
+
OpenPOWER on IntegriCloud