forked from ungleich-public/cdist
use sysrq to reboot
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
42e197a5ba
commit
f9d371c6e3
1 changed files with 10 additions and 1 deletions
|
@ -20,4 +20,13 @@
|
||||||
|
|
||||||
options="$(cat "$__object/parameter/options")"
|
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
|
||||||
|
|
Loading…
Reference in a new issue