Adding a panic message when we netboot and have no supported network device (Closes...
authorDaniel Baumann <daniel@debian.org>
Sun, 23 Nov 2008 17:09:50 +0000 (18:09 +0100)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:48:03 +0000 (17:48 +0100)
scripts/live

index d399d87..9c75f74 100755 (executable)
@@ -692,6 +692,14 @@ do_netmount ()
        [ -z ${HOSTNAME} ] && HOSTNAME=${OLDHOSTNAME}
        export HOSTNAME
 
+       # Check if we have a network device at all
+       if ! ls /sys/class/net/eth0 > /dev/null 2>&1 && \
+          ! ls /sys/class/net/wlan0 > /dev/null 2>&1 && \
+          ! ls /sys/class/net/ath0 > /dev/null 2>&1
+       then
+               panic "No supported network device found, maybe a non-mainline driver is required."
+       fi
+
        if [ "${NFSROOT}" = "auto" ]
        then
                NFSROOT=${ROOTSERVER}:${ROOTPATH}