altboot: Fix STDIN error messages on collie
authorMatthias Hentges <oe@hentges.net>
Wed, 12 Apr 2006 15:38:38 +0000 (15:38 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Wed, 12 Apr 2006 15:38:38 +0000 (15:38 +0000)
packages/altboot/altboot_0.0.0.bb
packages/altboot/files/init.altboot

index fbfad3c..73d0cfe 100644 (file)
@@ -6,7 +6,7 @@ MAINTAINER = "Matthias 'CoreDump' Hentges  <oe@hentges.net>"
 LICENSE = "GPL"
 IGNORE_STRIP_ERRORS = "1"
 
-PR = "r36"
+PR = "r37"
 
 
 SRC_URI = "file://altboot-menu \
index 273160b..cf3a1f8 100644 (file)
@@ -151,7 +151,7 @@ show_sub_menu() {
 # 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
                
@@ -161,7 +161,7 @@ run_timer() {
                        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"
@@ -179,7 +179,7 @@ run_timer() {
                        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
@@ -311,21 +311,18 @@ else
        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
        
@@ -344,7 +341,7 @@ else
                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