From: Harald Hoyer Date: Thu, 26 Nov 2009 09:38:40 +0000 (+0100) Subject: nfs: add rd_NFS_DOMAIN parameter to set the NFSv4 domain name X-Git-Tag: 003~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4073e3a32540bdefb66464e5bda5463be175d110;p=thirdparty%2Fdracut.git nfs: add rd_NFS_DOMAIN parameter to set the NFSv4 domain name https://bugzilla.redhat.com/show_bug.cgi?id=537969 --- diff --git a/dracut.8 b/dracut.8 index 6253ebffa..cb9bedd9b 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= +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 2ea14865f..4d86bc87f 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} \