# Shows the timer and sets $launch_altboot to yes if a keypress was detected
run_timer() {
if test "$TIMEOUT" != 0
- then
+ then
mount -t proc proc /proc >/dev/null 2>&1
test -z "$key_ints" && key_ints="`cat /proc/interrupts | grep -i corgikbd`";;
esac
- stty -echo
+ stty -echo </dev/tty0 >/dev/tty0 2>&1
echo -en "\n\nPlease press any key to launch altboot." > /dev/tty1
test -z "$TIMEOUT" && TIMEOUT="3"
if test "$key_ints_now" != "$key_ints" -o -z "$key_ints_now"
then
launch_altboot=yes
- stty echo
+ stty echo </dev/tty0 >/dev/tty0 2>&1
break
fi
echo -n "." >/dev/tty1
do
. /etc/altboot.rc/$file >/dev/tty1 2>&1 || echo "/etc/altboot.rc/$file failed!"
done
-
+
# Make sure altboots master password is set
set_password >/dev/tty0
test "$ASK_PW_ON_BOOT" = "yes" && verify_master_pw >/dev/tty0
-
# When started with -force, always print the menu
echo "$*" | grep -q -- "-force" && TIMEOUT=0
-
# This timeout works by reading /proc/interrupts to see if the keyboard interrupt
# increases while the timer is running. A TIMEOUT of 0 will always launch altboot.
- run_timer >/dev/tty1 2>&1
-
+ run_timer >/dev/tty1
echo "" >/dev/tty0
launch_selection /etc/altboot-menu >/dev/tty0
fi
- # Anything after this point will never be reached if $launch_altboot != yes
+ # Anything after this point will never be reached if $launch_altboot != yes
# Show the altboot menu
show_menu /etc/altboot-menu >/dev/tty0