summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2009-11-26 10:38:40 +0100
committerHarald Hoyer <harald@redhat.com>2009-11-26 10:38:40 +0100
commit4073e3a32540bdefb66464e5bda5463be175d110 (patch)
tree178bbc1c5ae37b914a5ecb5b23da660f606bf4c7
parent48df9fcc117ee21e9327a1d11f610022973c7e8a (diff)
nfs: add rd_NFS_DOMAIN parameter to set the NFSv4 domain name
https://bugzilla.redhat.com/show_bug.cgi?id=537969
-rw-r--r--dracut.83
-rwxr-xr-xmodules.d/95nfs/nfsroot6
2 files changed, 8 insertions, 1 deletions
diff --git a/dracut.8 b/dracut.8
index 6253ebf..cb9bedd 100644
--- a/dracut.8
+++ b/dracut.8
@@ -231,6 +231,9 @@ options can be specified.
\fBDeprecated!\fR kernel Documentation/filesystems/nfsroot.txt defines
this method.
This is supported by dracut but not recommended.
+.TP
+.B rd_NFS_DOMAIN=<NFSv4 domain name>
+Set the NFSv4 domain name. Will overwrite the settings in /etc/idmap.conf.
.SH iSCSI
.TP
diff --git a/modules.d/95nfs/nfsroot b/modules.d/95nfs/nfsroot
index 2ea1486..4d86bc8 100755
--- a/modules.d/95nfs/nfsroot
+++ b/modules.d/95nfs/nfsroot
@@ -133,7 +133,11 @@ if [ "$nfs" = "nfs4" ]; then
# XXX really needed? Do we need non-root users before we start it in
# XXX the real root image?
- [ -z "$(pidof rpc.idmapd)" ] && rpc.idmapd
+ if nfsdomain=$(getarg rd_NFS_DOMAIN); then
+ [ -z "$(pidof rpc.idmapd)" ] && rpc.idmapd -d $nfsdomain
+ else
+ [ -z "$(pidof rpc.idmapd)" ] && rpc.idmapd
+ fi
# XXX Should we loop here?
mount -t nfs4 -o$options${nfslock+,$nfslock} \