On 6/16/07, Robert Connolly <[EMAIL PROTECTED]> wrote:
> If anyone knows how, I would love it if '<ctrl> c' could be used to skip stuff
> during boot. For example if something hangs and I don't want to reboot in
> single user mode. The boot may be screwed up after, but it's convenient to
> have this as an option to save some time.
Right now those are handled on a case-by-case basis right now. For
instance, in checkfs, the script just says:
boot_mesg ...
read ENTER
${rc_base}/init.d/halt stop
So, we could just change that to something like
read reply
case "$reply" in
sh) sh ;;
*) ${rc_base}/init.d/halt stop ;;
esac
So, that way you could be dropped into a shell to try to work things
out. Maybe we could even have a little function.
shell_or_action()
{
local reply
if [ -z "$1" ]; then
# some error
return 1
fi
read reply
case "$reply" in
sh) sh ;;
*) eval $@ ;;
esac
}
Then in the script you'd have:
boot_mesg "Something bad happened. Enter sh to enter a shell or ENTER
to shutdown."
shell_or_action ${rc_base}/init.d/halt stop
--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page