use sysrq to reboot

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2016-12-14 08:12:02 +01:00
parent 42e197a5ba
commit f9d371c6e3
1 changed files with 10 additions and 1 deletions

View File

@ -20,4 +20,13 @@
options="$(cat "$__object/parameter/options")"
echo "reboot $options"
#echo "reboot $options"
cat << DONE
echo 1 > /proc/sys/kernel/sysrq
echo s > /proc/sysrq-trigger
# close file descriptors to detach from ssh
sh -c 'sleep 3; echo b > /proc/sysrq-trigger' > /dev/null 2>&1 </dev/null &
exit
DONE