better sysrq test
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
409f6f8cd2
commit
04ff160a7d
2
rc.in
2
rc.in
|
@ -132,7 +132,7 @@ rc.halt() {
|
||||||
if type -P halt; then
|
if type -P halt; 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