]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
netroot= variant is not supported for NFS, you must use root=
authorWarren Togami <wtogami@redhat.com>
Tue, 30 Jun 2009 20:27:45 +0000 (16:27 -0400)
committerWarren Togami <wtogami@redhat.com>
Tue, 30 Jun 2009 20:27:45 +0000 (16:27 -0400)
TODO: This temporarily breaks Legacy root=/dev/nfs.

modules.d/95nfs/parse-nfsroot.sh
test/TEST-20-NFS/test.sh

index 96076fddcea1d12bef6616fc132adf71d1c81d5f..d68ebe1e57960a7dad67d57948fc94d3145c2aa6 100755 (executable)
@@ -72,6 +72,17 @@ netroot_to_var() {
 [ -z "$netroot" ] && netroot=$(getarg netroot=)
 [ -z "$nfsroot" ] && nfsroot=$(getarg nfsroot=)
 
+# Netroot cmdline argument must be ignored, but must be used if
+# we're inside netroot to parse dhcp root-path
+if [ -n "$netroot" ] ; then
+    if [ "$netroot" = "$(getarg netroot=)" ] ; then
+        warn "Ignoring netroot argument for NFS"
+        netroot=$root
+    fi
+else
+    netroot=$root;
+fi 
+
 # Handle old style <server-ip>:/<path
 # FIXME: root= is not handled by this yet.
 case "$netroot" in
@@ -79,17 +90,6 @@ case "$netroot" in
        netroot=nfs:$netroot;;
 esac
 
-# Root takes precedence over netroot
-case "${root%%:*}" in
-    nfs|nfs4|/dev/nfs)
-    if [ -n "$netroot" ] ; then
-       warn "root takes precedence over netroot. Ignoring netroot"
-
-    fi
-    netroot=$root
-    ;;
-esac
-
 # Continue if nfs or blank prefix
 case "${netroot%%:*}" in
     ''|nfs|nfs4|/dev/nfs);;
index ee514b061c6fee904ffd62882eb05d797bbf4846..aeef36603e5ab7bba65040c7403fe1c8f7b6506f 100755 (executable)
@@ -104,34 +104,25 @@ test_nfsv3() {
     client_test "NFSv3 root=dhcp DHCP path only" 52:54:00:12:34:00 \
        "root=dhcp" 192.168.50.1 -wsize=4096 || return 1
 
-    client_test "NFSv3 netroot=dhcp DHCP path only" 52:54:00:12:34:00 \
-       "netroot=dhcp" 192.168.50.1 -wsize=4096  || return 1
+# XXX: Temporarily not supported during refactoring
+#    client_test "NFSv3 Legacy root=/dev/nfs DHCP path only" 52:54:00:12:34:00 \
+#      "root=/dev/nfs" 192.168.50.1 -wsize=4096 || return 1
 
-    client_test "NFSv3 root=/dev/nfs DHCP path only" 52:54:00:12:34:00 \
-       "root=/dev/nfs" 192.168.50.1 -wsize=4096 || return 1
+#    client_test "NFSv3 Legacy root=/dev/nfs DHCP IP:path" 52:54:00:12:34:01 \
+#      "root=/dev/nfs" 192.168.50.2 -wsize=4096 || return 1
 
-    client_test "NFSv3 netroot=dhcp DHCP IP:path" 52:54:00:12:34:01 \
-       "netroot=dhcp" 192.168.50.2 -wsize=4096 || return 1
+#    client_test "NFSv3 Legacy root=/dev/nfs nfsroot=IP:path" 52:54:00:12:34:01 \
+#      "root=/dev/nfs nfsroot=192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1
 
     client_test "NFSv3 root=dhcp DHCP IP:path" 52:54:00:12:34:01 \
        "root=dhcp" 192.168.50.2 -wsize=4096 || return 1
 
-    client_test "NFSv3 root=/dev/nfs DHCP IP:path" 52:54:00:12:34:01 \
-       "root=/dev/nfs" 192.168.50.2 -wsize=4096 || return 1
-
     client_test "NFSv3 root=dhcp DHCP proto:IP:path" 52:54:00:12:34:02 \
        "root=dhcp" 192.168.50.3 -wsize=4096 || return 1
 
-    client_test "NFSv3 netroot=dhcp DHCP proto:IP:path:options" \
-       52:54:00:12:34:03 "netroot=dhcp" 192.168.50.3 wsize=4096 || return 1
-
     client_test "NFSv3 root=dhcp DHCP proto:IP:path:options" 52:54:00:12:34:03 \
        "root=dhcp" 192.168.50.3 wsize=4096 || return 1
 
-    client_test "NFSv3 netroot=nfs:..." 52:54:00:12:34:04 \
-       "netroot=nfs:192.168.50.1:/nfs/client" 192.168.50.1 \
-       -wsize=4096 || return 1
-
     client_test "NFSv3 root=nfs:..." 52:54:00:12:34:04 \
        "root=nfs:192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1
 
@@ -154,22 +145,12 @@ test_nfsv4() {
     # server, so put these later in the list to avoid a pause when doing
     # switch_root
 
-    client_test "NFSv4 netroot=dhcp DHCP proto:IP:path" 52:54:00:12:34:82 \
-       "netroot=dhcp" 192.168.50.3 -wsize=4096 || return 1
-
     client_test "NFSv4 root=dhcp DHCP proto:IP:path" 52:54:00:12:34:82 \
        "root=dhcp" 192.168.50.3 -wsize=4096 || return 1
 
-    client_test "NFSv4 netroot=dhcp DHCP proto:IP:path:options" \
-       52:54:00:12:34:83 "netroot=dhcp" 192.168.50.3 wsize=4096 || return 1
-
     client_test "NFSv4 root=dhcp DHCP proto:IP:path:options" 52:54:00:12:34:83 \
        "root=dhcp" 192.168.50.3 wsize=4096 || return 1
 
-    client_test "NFSv4 netroot=nfs4:..." 52:54:00:12:34:84 \
-       "netroot=nfs4:192.168.50.1:/client" 192.168.50.1 \
-       -wsize=4096 || return 1
-
     client_test "NFSv4 root=nfs4:..." 52:54:00:12:34:84 \
        "root=nfs4:192.168.50.1:/client" 192.168.50.1 \
        -wsize=4096 || return 1