[ -z "$netroot" ] && netroot=$(getarg netroot=)
[ -z "$nfsroot" ] && nfsroot=$(getarg nfsroot=)
-# nfsroot= is valid only if root=/dev/nfs
-if [ -n "$nfsroot" ] ; then
- # @deprecated
- warn "Argument nfsroot is deprecated and might be removed in a future release. See http://apps.sourceforge.net/trac/dracut/wiki/commandline for more information."
- if [ "$(getarg root=)" != "/dev/nfs" ]; then
- die "Argument nfsroot only accepted for legacy root=/dev/nfs"
- fi
-fi
-
# netroot= cmdline argument must be ignored, but must be used if
# we're inside netroot to parse dhcp root-path
if [ -n "$netroot" ] ; then
netroot=$root;
fi
-# Handle old style <server-ip>:/<path
+# LEGACY convert nfsroot= is valid only if root=/dev/nfs
+if [ -n "$nfsroot" ] ; then
+ # @deprecated
+ warn "Argument nfsroot is deprecated and might be removed in a future release. See http://apps.sourceforge.net/trac/dracut/wiki/commandline for more information."
+ if [ "$(getarg root=)" != "/dev/nfs" ]; then
+ die "Argument nfsroot only accepted for legacy root=/dev/nfs"
+ fi
+ netroot=nfs:$nfsroot;
+fi
+
+# LEGACY convert root=<server-ip>:/<path
case "$netroot" in
[0-9]*:/*|[0-9]*\.[0-9]*\.[0-9]*[!:]|/*)
netroot=nfs:$netroot;;
client_test "NFSv3 root=dhcp DHCP path only" 52:54:00:12:34:00 \
"root=dhcp" 192.168.50.1 -wsize=4096 || return 1
-# XXX: Temporarily not supported during refactoring
-# 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 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
+
+# XXX Fix me
# 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
#