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