Commit a271d365 authored by Mike Hibler's avatar Mike Hibler

Add a "failstop" command line argument for frisbee MFS.

If specified on the kernel command line in the pxelinux.cfg config,
the init script will drop to a shell prompt when frisbee fails.
With failstop off, it will instead report via "tmcc bootlog", wait
a couple of seconds, and then reboot in order to try again.
parent 24ade742
......@@ -56,6 +56,7 @@ export blacklist=
export resume=
export resume_offset=
export recovery=
export failstop=n
# mdadm needs hostname to be set. This has to be done before the udev rules are called!
if [ -f "/etc/hostname" ]; then
......@@ -81,6 +82,9 @@ for x in $(cat /proc/cmdline); do
pxefail)
preinit="/usr/local/etc/emulab/pxewait fail"
;;
failstop)
failstop=y
;;
root=*)
ROOT=${x#root=}
case $ROOT in
......@@ -350,8 +354,14 @@ if [ -e /tmp/stat ]; then
stat=`cat /tmp/stat`
fi
if [ $stat -ne 0 ]; then
export FRISBEE_EXIT_STATUS=$stat
panic "${init} failed; dropping to shell, see /tmp/frisbee.out."
if [ "$failstop" = "y" ]; then
export FRISBEE_EXIT_STATUS=$stat
panic "${init} failed; dropping to shell, see /tmp/frisbee.out."
else
/usr/local/etc/emulab/tmcc -f /tmp/frisbee.out bootlog
sleep 2
reboot
fi
fi
maybe_break postfrisbee
......
Markdown is supported
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