altboot: - Fix image_reconf to propperly mount /home.flash
authorMatthias Hentges <oe@hentges.net>
Sun, 16 Apr 2006 12:31:48 +0000 (12:31 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sun, 16 Apr 2006 12:31:48 +0000 (12:31 +0000)
- Add another bunch of missing redirects for Collie
- Work around error message of playbeep.sh on first-boot
- Re-enable propper failsafe fallthroughs in init.altboot

packages/altboot/altboot_0.0.0.bb
packages/altboot/files/akita/altboot-2.6.cfg
packages/altboot/files/altboot-menu/Advanced/40-bootNFS
packages/altboot/files/altboot.func
packages/altboot/files/altboot.rc/playbeep.sh
packages/altboot/files/init.altboot

index 73d0cfe..f9bf461 100644 (file)
@@ -6,7 +6,7 @@ MAINTAINER = "Matthias 'CoreDump' Hentges  <oe@hentges.net>"
 LICENSE = "GPL"
 IGNORE_STRIP_ERRORS = "1"
 
-PR = "r37"
+PR = "r38"
 
 
 SRC_URI = "file://altboot-menu \
index c9a030b..6da57be 100644 (file)
@@ -19,6 +19,9 @@ USB_STORAGE_MODULES="usb_ohci_pxa27x usb-storage"
 USB_STORAGE_PARTITION="/dev/sda1"
 USB_STORAGE_WAIT="4"
 
+USB_NETWORKING_AVAILABLE="yes"
+USB_NW_MODULES="g_ether"
+
 KEXEC_KERNEL_DIR="/boot"
 KEXEC_BIN="/usr/sbin/kexec"
 
index c3fb7ce..f18c27b 100644 (file)
@@ -1,8 +1,11 @@
-# !/bin/sh
+#/bin/sh
 #
-# Copyright Matthias Hentges (c) 2005
+# Copyright Matthias Hentges <devel@hentges.net> (c) 2006
+# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
 #
-# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL)
+# Filename: 40-bootNFS
+# Date: 14-Apr-06
+
 
 M_TITLE="Boot from NFS"
 
@@ -70,12 +73,15 @@ run_module() {
                                
                                if test "$cnt" = 30
                                then
-                                       echo "Restarting udhcpc"
+                                       let cnt=$cnt+1
+                                       echo "Restarting udhcpc for [$WLAN_NIC]"
                                        killall udhcpc
                                        
-                                       udhcpc -i "$WLAN_NIC" -H `cat /etc/hostname` >/dev/null 2>&1
+                                       udhcpc -i "$WLAN_NIC" -H `cat /etc/hostname` >/dev/tty1 2>&1
+                                       
+                                       
                                else
-                                       die "Failed to activate WLAN!"
+                                       mdie "Failed to activate WLAN!"
                                        break                   
                                fi
                        else
index 31704e4..94794fa 100644 (file)
@@ -240,37 +240,18 @@ image_conf(){
                        
                        if test "$junk" = "y" -o "$junk" = "Y"
                        then
-                               cat $1/etc/fstab | sed "/.*\/home.*/s/\/home/\/home.orig/" > $1/etc/fstab_
+                               cat $1/etc/fstab | sed "/.*\/home.*/s/\/home/\/home.flash/" > $1/etc/fstab_
                                mv $1/etc/fstab_ $1/etc/fstab
+
+                               mkdir -p $1/home.flash
                                break
                        fi
                        
                        test "$junk" = "" -o "$junk" = n -o "$junk" = N && break
                done
                
-       fi      
-
-       echo ""
+       fi              
                                
-#      if ( cat $1/etc/fstab | grep -v "^#" | grep -q "/var" )         
-#      then                                            
-#              while true
-#              do
-#                      echo "This is mainly for testing purposes."
-#                      echo -n "Do you want to configure /var as a normal non-tmpfs directory? [N|y] "
-#                      read junk
-#                      
-#                      if test "$junk" = "y" -o "$junk" = "Y"
-#                      then
-#                              cat $1/etc/fstab | sed "/.*\/var.*/s/\(.*\)/#\ \1/" > $1/etc/fstab_
-#                              mv $1/etc/fstab_ $1/etc/fstab
-#                              break
-#                      fi
-#                      
-#                      test "$junk" = "" -o "$junk" = n -o "$junk" = N && break
-#              done
-#      fi              
-
        echo ""
 
        if ( cat $1/etc/ipkg.conf | grep -q ^lists_dir )                
@@ -329,17 +310,17 @@ set_password() {
                do
                        echo -en "\nNew password: "
 
-                       stty -echo
+                       stty -echo </dev/tty0 >/dev/tty0 2>&1
                        read junk1 < /dev/tty0
-                       stty echo
+                       stty echo </dev/tty0 >/dev/tty0 2>&1
 
                        if ! test -z "$junk1"
                        then
                                echo -en "\nRepeat: "
                                
-                               stty -echo
+                               stty -echo </dev/tty0 >/dev/tty0 2>&1
                                read junk2  < /dev/tty0
-                               stty echo
+                               stty echo </dev/tty0 >/dev/tty0 2>&1
                                echo ""
                                
                                if test "$junk1" = "$junk2"
@@ -379,9 +360,9 @@ verify_master_pw() {
                do
                        let cnt=$cnt+$auth_timeout
                        echo -n "Password: "
-                       stty -echo
+                       stty -echo  </dev/tty0 >/dev/tty0 2>&1
                        read junk < /dev/tty0
-                       stty echo
+                       stty echo  </dev/tty0 >/dev/tty0 2>&1
 
                        if test "`echo "$junk" | md5sum | awk '{print $1}'`" = "$MASTER_PASSWORD"
                        then
index 198a874..6cc5b8b 100644 (file)
@@ -6,9 +6,9 @@
 # Filename: playbeep.sh
 # Date: 12-Apr-06
 
-if test -x /usr/sbin/alsactl
+if test -x /usr/sbin/alsactl -a -e /etc/modules
 then
-       for module in `cat /etc/modules | grep snd | grep -v ^#`
+       for module in `cat /etc/modules | grep snd | grep -v ^#` 
        do
                #echo "loading $module"
                modprobe $module
@@ -30,3 +30,5 @@ then
        
        test -e /usr/share/sounds/beep.raw && cat /usr/share/sounds/beep.raw > /dev/dsp  
 fi
+
+/bin/true
index cf3a1f8..7d8b1b6 100644 (file)
@@ -31,13 +31,18 @@ C_BLUE="\033[34m"
 C_WHITE="\033[37m"
 C_RESET="\033[0m"
 
-die() {
+mdie() {
        echo "ERROR: $1" >/dev/tty0
-       #exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
        
-       echo -e "\nPress <ENTER> to launch the altboot menu"
+       echo -e "\nPress <ENTER> to return to the menu"
        read junk
-       exec /sbin/init.altboot -force</dev/tty0 >/dev/tty0 2>&1
+       
+       test "$junk" = x && exec /bin/sh || exec /sbin/init.altboot -force</dev/tty0 >/dev/tty0 2>&1
+}
+
+die() {
+       echo -e "ERROR: $1" >/dev/tty0
+       exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
 }
 
 
@@ -285,7 +290,7 @@ wait_for_input() {
 }
 
 # * * * * * * This is the main function * * * * * *
-# Note: this is positivly ugly. If someone knows a better way to detect wheter
+# Note: this is positively ugly. If someone knows a better way to detect wheter
 # we are already booted into a runlevel _without_ reading /var and / or using `runlevel`
 # PLEASE let me know.
 if test -f /proc/cmdline -a "`ps ax|wc -l|tr -d " "`" -gt 30 -a "$1" != "-force"