Commit 49b75931 authored by Mike Hibler's avatar Mike Hibler

Save rc.frisbee output to a file.

So if we drop to a shell prompt, we can see what happened.
parent 3d1f61d7
......@@ -342,8 +342,18 @@ if [ -n "${preinit}" ]; then
${preinit} "$@" </dev/console >/dev/console 2>&1
fi
${init} "$@" </dev/console >/dev/console 2>&1
if [ $? -ne 0 ]; then
panic "${init} failed, dropping to shell."
# this would be a lot simpler if we didn't want to tee output to the console
rm -f /tmp/stat
(${init} "$@" || echo $? >/tmp/stat) </dev/console 2>&1 | tee /tmp/frisbee.out >/dev/console
stat=$?
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."
fi
maybe_break postfrisbee
exit 0
......@@ -610,8 +610,9 @@ while [ -n "$1" ]; do
eval ${dev}_info=\"$iline\"
loadone $LDISK $PART "$iline" $NUM || {
stat=$?
echo "`date`: Failed to load disk, dropping to login prompt"
exit 1
exit $stat
}
echo "`date`: Image #$_NUM load complete"
NUM=`expr $NUM + 1`
......
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