diff options
author | Matthias Hentges <oe@hentges.net> | 2006-04-16 12:31:48 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-04-16 12:31:48 +0000 |
commit | e548219776e8934492025573169b3c5e2f8a79d1 (patch) | |
tree | c5068fd0be7c949a855d3ca95c9cde4d1cd3735a /packages/altboot/files | |
parent | a20617a89a744f4521065324ebe33811a036b098 (diff) |
altboot: - Fix image_reconf to propperly mount /home.flash
- 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
Diffstat (limited to 'packages/altboot/files')
-rw-r--r-- | packages/altboot/files/akita/altboot-2.6.cfg | 3 | ||||
-rw-r--r-- | packages/altboot/files/altboot-menu/Advanced/40-bootNFS | 18 | ||||
-rw-r--r-- | packages/altboot/files/altboot.func | 39 | ||||
-rw-r--r-- | packages/altboot/files/altboot.rc/playbeep.sh | 6 | ||||
-rw-r--r-- | packages/altboot/files/init.altboot | 15 |
5 files changed, 39 insertions, 42 deletions
diff --git a/packages/altboot/files/akita/altboot-2.6.cfg b/packages/altboot/files/akita/altboot-2.6.cfg index c9a030b348..6da57be958 100644 --- a/packages/altboot/files/akita/altboot-2.6.cfg +++ b/packages/altboot/files/akita/altboot-2.6.cfg @@ -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" diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS index c3fb7cedc4..f18c27b044 100644 --- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS +++ b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS @@ -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 diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func index 31704e4029..94794fa8ff 100644 --- a/packages/altboot/files/altboot.func +++ b/packages/altboot/files/altboot.func @@ -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 diff --git a/packages/altboot/files/altboot.rc/playbeep.sh b/packages/altboot/files/altboot.rc/playbeep.sh index 198a87429f..6cc5b8bcdf 100644 --- a/packages/altboot/files/altboot.rc/playbeep.sh +++ b/packages/altboot/files/altboot.rc/playbeep.sh @@ -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 diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot index cf3a1f8262..7d8b1b6592 100644 --- a/packages/altboot/files/init.altboot +++ b/packages/altboot/files/init.altboot @@ -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" |