2 Commits

Author SHA1 Message Date
fbt
58054382e2 null the type output
Signed-off-by: fbt <fbt@fleshless.org>
2016-03-26 18:13:47 +03:00
fbt
04ff160a7d better sysrq test
Signed-off-by: fbt <fbt@fleshless.org>
2016-03-26 17:52:27 +03:00

4
rc.in
View File

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