Add rc.halt command which will shutdown and halt a running system.

Suggested-by: Bachman Kharazmi
This commit is contained in:
Scott Ullrich 2004-12-28 20:52:33 +00:00
parent 7ab8562cb3
commit 405e5de066
3 changed files with 15 additions and 1 deletions

View File

@ -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;

6
etc/rc.halt Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
sleep 1
/sbin/shutdown -h now

View File

@ -3,4 +3,4 @@
sleep 1
/sbin/shutdown -r now
#/sbin/reboot