SlugOS: make "turnup nfs" work correctly with the new network driver (loads
authorMike Westerhof <mwester@dls.net>
Sun, 10 Feb 2008 01:55:22 +0000 (01:55 +0000)
committerMike Westerhof <mwester@dls.net>
Sun, 10 Feb 2008 01:55:22 +0000 (01:55 +0000)
firmware, and ensures we do not ifup the interface if the rootfs in nfs).

packages/netbase/netbase/slugos/if-pre-up.d/test-nfsroot [new file with mode: 0644]
packages/netbase/netbase_4.21.bb
packages/slugos-init/files/boot/network
packages/slugos-init/slugos-init_4.8.bb

diff --git a/packages/netbase/netbase/slugos/if-pre-up.d/test-nfsroot b/packages/netbase/netbase/slugos/if-pre-up.d/test-nfsroot
new file mode 100644 (file)
index 0000000..bbfd7d9
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+if [ X"$IFACE" == "Xeth0" ] ; then
+  nfsroot=`grep ' / nfs ' /proc/mounts`
+  if [ -n "$nfsroot" ]; then
+    echo "WARNING: Refusing to ifup eth0 when booted to a nfs-mounted rootfs."
+    exit 1
+  fi
+fi
+exit 0
index 1f2837a..73e7653 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "This package provides the necessary \
 infrastructure for basic TCP/IP based networking."
 SECTION = "base"
 LICENSE = "GPL"
-PR = "r26"
+PR = "r27"
 
 inherit update-rc.d
 
index 8c0635d..8124f19 100644 (file)
@@ -25,7 +25,7 @@ iface="$(config iface)"
 test -z "$iface" && exit 1 
 #
 # Fire up a process in the background to load the firmware if necessary
-sysf="/sys/class/firmware/$iface"
+sysf="/sys/class/firmware/firmware-$iface"
 (
        # Wait for the firware to be requested, if required
        [ -f $sysf/loading ] || sleep 1
index 92ac7e3..4babf89 100644 (file)
@@ -4,7 +4,7 @@ PRIORITY = "required"
 LICENSE = "GPL"
 DEPENDS = "base-files devio"
 RDEPENDS = "busybox devio"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "file://boot/flash \
           file://boot/disk \