Bootscript patches

Dan Nicholson dbn.lists at
Sat Jun 16 13:07:33 PDT 2007

On 6/16/07, Robert Connolly <robert at> 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 ;;

So, that way you could be dropped into a shell to try to work things
out. Maybe we could even have a little function.

local reply

if [ -z "$1" ]; then
    # some error
    return 1

read reply
case "$reply" in
    sh) sh ;;
    *) eval $@ ;;

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


More information about the lfs-dev mailing list