LICENSE = "GPL"
IGNORE_STRIP_ERRORS = "1"
-PR = "r37"
+PR = "r38"
SRC_URI = "file://altboot-menu \
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"
-# !/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"
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
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 )
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"
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
# 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
test -e /usr/share/sounds/beep.raw && cat /usr/share/sounds/beep.raw > /dev/dsp
fi
+
+/bin/true
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
}
}
# * * * * * * 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"