summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2007-05-27 00:43:18 +0200
committermaximilian attems <maks@debian.org>2007-05-27 00:43:18 +0200
commitbb98536c4c1b597ed326c8729e048eac5526869b (patch)
tree8c25155126938e2f0c685baf571cffc1d69ad976 /scripts
parent0df638ec51ee9a8362f3c81ceb9070d8e2820381 (diff)
downloadinitramfs-tools-bb98536c4c1b597ed326c8729e048eac5526869b.tar.gz
initramfs-tools-bb98536c4c1b597ed326c8729e048eac5526869b.zip
scripts/nfs: fix when root-path includes server-ip
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nfs8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/nfs b/scripts/nfs
index 5eb17bf..717dfe8 100644
--- a/scripts/nfs
+++ b/scripts/nfs
@@ -41,7 +41,13 @@ do_nfsmount()
# get nfs root from dhcp
if [ "x${NFSROOT}" = "xauto" ]; then
- NFSROOT=${ROOTSERVER}:${ROOTPATH}
+ # check if server ip is part of dhcp root-path
+ if [ "${ROOTPATH#*:}" = "${ROOTPATH}" ]; then
+ NFSROOT=${ROOTSERVER}:${ROOTPATH}
+ else
+ NFSROOT=${ROOTPATH}
+ fi
+
# nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
elif [ -n "${NFSROOT}" ]; then
# nfs options are an optional arg