diff options
author | Matthias Hentges <oe@hentges.net> | 2006-04-16 17:21:08 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-04-16 17:21:08 +0000 |
commit | dda0f8c7a259a59db463e18f4465bca8054032d0 (patch) | |
tree | f91df7037647650e23c32dc258806d09502dd996 /packages/altboot/files/altboot-menu | |
parent | eadb3d4295eacea15d745f7f88d181652ff1253d (diff) |
altboot: Allow usage of USB network (g_ether) for NFS booting
Diffstat (limited to 'packages/altboot/files/altboot-menu')
-rw-r--r-- | packages/altboot/files/altboot-menu/Advanced/40-bootNFS | 61 |
1 files changed, 3 insertions, 58 deletions
diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS index f18c27b044..352b29ed07 100644 --- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS +++ b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS @@ -21,34 +21,14 @@ run_module() { # Mount /proc, etc init_rootfs - - # Needed for NFS - /etc/init.d/portmap start >/dev/null 2>&1 || die "/etc/init.d/portmap start failed!" - - # For some reason NFS mounts hang if /e/i/networking is not run. - # For the time beeing I'm too lazy to investigate ;) - /etc/init.d/networking start >/dev/null 2>&1 || die "/etc/init.d/networking start failed!" - - sleep 2 - - # After the PCMCIA service is started, an inserted WLAN card should automatically - # activate itself. - - if test -x /etc/init.d/pcmcia - then - /etc/init.d/pcmcia start >/dev/null 2>&1 || die "/etc/init.d/pcmcia start failed!" - else - # With kernel 2.6.16+ udev is used - /etc/init.d/udev start >/dev/null 2>&1 || die "/etc/init.d/udev start failed!" - - /etc/init.d/udev stop - fi - + nfs_host="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $1}'|sed -n "s/\(.*\)\:\(.*\)/\1/p" `" nfs_mounts="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $1}'`" nfs_mountpoints="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $2}'`" WLAN_NIC="`iwconfig 2>/dev/null | grep ESSID | awk '{print $1}'`" + + start_networking "$nfs_host" if test -z "$nfs_host" then @@ -56,41 +36,6 @@ run_module() { fi - # WLAN with DHCP needs some time to get a lease, set up the routing, etc. - echo -n "Waiting for WLAN" - cnt=0 - while true - do - if (ping -c 1 $nfs_host) >/dev/null 2>&1 - then - echo " found" - break - else - if test "$cnt" = 30 -o "$cnt" = 60 - then - echo "" - echo "WARNING: WLAN didn't activate in $cnt seconds!" - - if test "$cnt" = 30 - then - let cnt=$cnt+1 - echo "Restarting udhcpc for [$WLAN_NIC]" - killall udhcpc - - udhcpc -i "$WLAN_NIC" -H `cat /etc/hostname` >/dev/tty1 2>&1 - - - else - mdie "Failed to activate WLAN!" - break - fi - else - echo -n "." - let cnt=$cnt+1 - fi - fi - sleep 1 - done if test "` echo "$nfs_mountpoints" |wc -l | tr -d " "`" -gt 1 then |