Merge branch 'master' of builder:git/spark-rc
This commit is contained in:
commit
b640a64e21
4
rc.in
4
rc.in
|
@ -129,10 +129,10 @@ rc.boot() {
|
||||||
}
|
}
|
||||||
|
|
||||||
rc.halt() {
|
rc.halt() {
|
||||||
if type -P halt; then
|
if type -P halt &>/dev/null; then
|
||||||
function rc.halt_poweroff { halt -p; }
|
function rc.halt_poweroff { halt -p; }
|
||||||
function rc.halt_reboot { halt -r; }
|
function rc.halt_reboot { halt -r; }
|
||||||
elif [[ -f /proc/sysrq-trigger ]]; then
|
elif (( $(</proc/sys/kernel/sysrq) )); then
|
||||||
function rc.halt_poweroff { echo 'o' > /proc/sysrq-trigger; }
|
function rc.halt_poweroff { echo 'o' > /proc/sysrq-trigger; }
|
||||||
function rc.halt_reboot { echo 'b' > /proc/sysrq-trigger; }
|
function rc.halt_reboot { echo 'b' > /proc/sysrq-trigger; }
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user