Commit ea2e26e7 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Put the halt/reboot into the background so that the shell/ssh

terminates properly (zero status) instead of being killed by
the reboot/halt (and exiting with -1). Noticed on Debian 8.0.
parent 18e9f894
......@@ -38,9 +38,11 @@ fi
if [ $reboot -eq 1 ]; then
if [ $dohalt -eq 1 ]; then
# This little bit of sillyness is to ensure that this
# script exits with zero status before the node halts.
(sleep 1; /sbin/halt) >/dev/null 2>&1 </dev/null &
(sleep 1; /sbin/reboot) >/dev/null 2>&1 </dev/null &
exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment