Merge branch 'master' of builder:git/spark-rc

This commit is contained in:
Jack L. Frost 2016-03-29 15:40:20 +03:00
commit b640a64e21

4
rc.in
View File

@ -129,10 +129,10 @@ rc.boot() {
}
rc.halt() {
if type -P halt; then
if type -P halt &>/dev/null; then
function rc.halt_poweroff { halt -p; }
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_reboot { echo 'b' > /proc/sysrq-trigger; }
else