From 04ff160a7d89049b452fe7f7da97af5eb4c6b900 Mon Sep 17 00:00:00 2001 From: fbt Date: Sat, 26 Mar 2016 17:52:27 +0300 Subject: [PATCH 1/2] better sysrq test Signed-off-by: fbt --- rc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc.in b/rc.in index d68280b..22b7a7f 100644 --- a/rc.in +++ b/rc.in @@ -132,7 +132,7 @@ rc.halt() { if type -P halt; then function rc.halt_poweroff { halt -p; } function rc.halt_reboot { halt -r; } - elif [[ -f /proc/sysrq-trigger ]]; then + elif (( $( /proc/sysrq-trigger; } function rc.halt_reboot { echo 'b' > /proc/sysrq-trigger; } else From 58054382e2b99d82393a92f598e6f89e09ea7e8f Mon Sep 17 00:00:00 2001 From: fbt Date: Sat, 26 Mar 2016 18:13:47 +0300 Subject: [PATCH 2/2] null the type output Signed-off-by: fbt --- rc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc.in b/rc.in index 22b7a7f..0e1668e 100644 --- a/rc.in +++ b/rc.in @@ -129,7 +129,7 @@ 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 (( $(