From: Matthias Hentges Date: Sat, 8 Apr 2006 20:44:09 +0000 (+0000) Subject: altboot: Fix NFS booting with kernel 2.6.16 (not pcmcia-utils) X-Git-Tag: Release-2010-05/1~9453^2~2086^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3724484727c2d518ce257b172e32f99881261e2;p=openembedded.git altboot: Fix NFS booting with kernel 2.6.16 (not pcmcia-utils) --- diff --git a/packages/altboot/altboot_0.0.0.bb b/packages/altboot/altboot_0.0.0.bb index 2df0e16792..d146b2ab45 100644 --- a/packages/altboot/altboot_0.0.0.bb +++ b/packages/altboot/altboot_0.0.0.bb @@ -6,7 +6,7 @@ MAINTAINER = "Matthias 'CoreDump' Hentges " LICENSE = "GPL" IGNORE_STRIP_ERRORS = "1" -PR = "r34" +PR = "r35" SRC_URI = "file://altboot-menu \ diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS index e01af7faad..e81526d251 100644 --- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS +++ b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS @@ -30,12 +30,21 @@ run_module() { # After the PCMCIA service is started, an inserted WLAN card should automatically # activate itself. - /etc/init.d/pcmcia start >/dev/null 2>&1 || die "/etc/init.d/pcmcia/start failed!" - + + 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!" + 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}'`" + if test -z "$nfs_host" then die "${C_RED}No configured NFS drives found in /etc/fstab$C_RESET" @@ -61,7 +70,8 @@ run_module() { then echo "Restarting udhcpc" killall udhcpc - udhcpc -i wlan0 -H `cat /etc/hostname` >/dev/null 2>&1 + + udhcpc -i "$WLAN_NIC" -H `cat /etc/hostname` >/dev/null 2>&1 else die "Failed to activate WLAN!" break