#
# Preferred format:
# root=nfs[4]:[server:]path[:options]
+# FIXME: What is the below referring to other than root=dhcp?
# [root=*] netroot=nfs[4]:[server:]path[:options]
#
-# Legacy formats:
-# [net]root=[[/dev/]nfs[4]] nfsroot=[server:]path[,options]
-# [net]root=[[/dev/]nfs[4]] nfsroot=[server:]path[:options]
+# Legacy format:
+# root=/dev/nfs nfsroot=[server:]path[,options]
#
+# FIXME: This blurb below refers to only legacy?
# If the 'nfsroot' parameter is not given on the command line or is empty,
# the dhcp root-path is used as [server:]path[:options] or the default
# "/tftpboot/%s" will be used.
# Root takes precedence over netroot
case "${root%%:*}" in
- nfs|nfs4|/dev/nfs|/dev/nfs4)
+ nfs|nfs4|/dev/nfs)
if [ -n "$netroot" ] ; then
warn "root takes precedence over netroot. Ignoring netroot"
# If it's not empty or nfs we don't continue
case "${netroot%%:*}" in
- ''|nfs|nfs4|/dev/nfs|/dev/nfs4);;
+ ''|nfs|nfs4|/dev/nfs);;
*) return;;
esac
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."
case "$netroot" in
- ''|nfs|nfs4|/dev/nfs|/dev/nfs4) netroot=${netroot:-nfs}:$nfsroot;;
- *) die "Argument nfsroot only accepted for empty root= or root=[/dev/]nfs[4]"
+ /dev/nfs) netroot=${netroot:-nfs}:$nfsroot;;
+ *) die "Argument nfsroot only accepted for legacy root=/dev/nfs"
esac
fi
# If it's not nfs we don't continue
case "${netroot%%:*}" in
- nfs|nfs4|/dev/nfs|/dev/nfs4);;
+ nfs|nfs4|/dev/nfs);;
*) return;;
esac
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
- client_test "NFSv3 nfsroot=/nfs/client" 52:54:00:12:34:04 \
- "nfsroot=/nfs/client" 192.168.50.1 -wsize=4096 || return 1
-
- client_test "NFSv3 nfsroot=192.168.50.2:/nfs/client" 52:54:00:12:34:04 \
- "nfsroot=192.168.50.2:/nfs/client" 192.168.50.2 -wsize=4096 || return 1
-
# This test must fail: root=dhcp must ignore other arguments
client_test "NFSv3 root=dhcp nfsroot=/nfs/client" 52:54:00:12:34:04 \
"root=dhcp nfsroot=/nfs/client" 192.168.50.1 -wsize=4096 && return 1
- client_test "NFSv3 root=nfs nfsroot=/nfs/client" 52:54:00:12:34:04 \
- "root=nfs nfsroot=/nfs/client" 192.168.50.1 -wsize=4096 || return 1
-
- client_test "NFSv3 root=nfs nfsroot=/nfs/%s" 52:54:00:12:34:04 \
- "root=nfs nfsroot=/nfs/%s" 192.168.50.1 -wsize=4096 || return 1
-
- client_test "NFSv3 root=nfs nfsroot=/nfs/ip/%s no host name (use IP)" \
- 52:54:00:12:34:7f \
- "root=nfs nfsroot=/nfs/ip/%s \
- ip=192.168.50.101:192.168.50.1::255.255.255.0::eth0:off" \
- 192.168.50.1 -wsize=4096 || return 1
-
- client_test "NFSv3 root=nfs nfsroot=/nfs/client,wsize=4096" \
- 52:54:00:12:34:04 "root=nfs nfsroot=/nfs/client,wsize=4096" \
- 192.168.50.1 wsize=4096 || return 1
-
client_test "NFSv3 root=dhcp DHCP path,options" \
52:54:00:12:34:05 "root=dhcp" 192.168.50.1 wsize=4096 || return 1
client_test "NFSv4 root=nfs4 DHCP path only" 52:54:00:12:34:80 \
"root=nfs4" 192.168.50.1 -wsize=4096 || return 1
- client_test "NFSv4 root=/dev/nfs4 DHCP path only" 52:54:00:12:34:80 \
- "root=/dev/nfs4" 192.168.50.1 -wsize=4096 || return 1
-
client_test "NFSv4 netroot=nfs4 DHCP IP:path" 52:54:00:12:34:81 \
"netroot=nfs4" 192.168.50.2 -wsize=4096 || return 1
client_test "NFSv4 root=nfs4 DHCP IP:path" 52:54:00:12:34:81 \
"root=nfs4" 192.168.50.2 -wsize=4096 || return 1
- client_test "NFSv4 root=/dev/nfs4 DHCP IP:path" 52:54:00:12:34:81 \
- "root=/dev/nfs4" 192.168.50.2 -wsize=4096 || return 1
-
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
"root=nfs4:192.168.50.1:/client" 192.168.50.1 \
-wsize=4096 || return 1
- client_test "NFSv4 root=nfs4 nfsroot=/client" 52:54:00:12:34:84 \
- "root=nfs4 nfsroot=/client" 192.168.50.1 -wsize=4096 || return 1
-
- client_test "NFSv4 root=nfs4 nfsroot=192.168.50.2:/client" \
- 52:54:00:12:34:84 "root=nfs4 nfsroot=192.168.50.2:/client" \
- 192.168.50.2 -wsize=4096 || return 1
-
- client_test "NFSv4 root=nfs4 nfsroot=path,opts" \
- 52:54:00:12:34:84 "root=nfs4 nfsroot=/client,wsize=4096" \
- 192.168.50.1 wsize=4096 || return 1
-
- # These two only work with NFSv4 in the test suite -- NFSv3 needs
- # a /nfs prefix due to our server configuration
-
client_test "NFSv4 netroot=nfs4" 52:54:00:12:34:84 \
"netroot=nfs4" 192.168.50.1 -wsize=4096 || return 1