use sysrq to reboot

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
remotes/origin/fix-j
Steven Armstrong 8 years ago
parent 42e197a5ba
commit f9d371c6e3
  1. 11
      cdist/conf/type/__install_reboot/gencode-remote

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

Loading…
Cancel
Save