mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add rc.halt command which will shutdown and halt a running system.
Suggested-by: Bachman Kharazmi
This commit is contained in:
parent
7ab8562cb3
commit
405e5de066
@ -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
6
etc/rc.halt
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
sleep 1
|
||||
|
||||
/sbin/shutdown -h now
|
||||
|
||||
@ -3,4 +3,4 @@
|
||||
sleep 1
|
||||
|
||||
/sbin/shutdown -r now
|
||||
#/sbin/reboot
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user