summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2012-09-10 15:43:42 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2012-09-10 15:43:42 -0500
commit3863c11be5d48ad4d1a10156f474339bea04f5ae (patch)
tree015f06a5b9887c60b52ce25e99bf20bf172b3f30
parent5092595835461e889fbac14d4cfc6c06b5f55019 (diff)
downloadopenrc-3863c11be5d48ad4d1a10156f474339bea04f5ae.tar.gz
openrc-3863c11be5d48ad4d1a10156f474339bea04f5ae.tar.bz2
openrc-3863c11be5d48ad4d1a10156f474339bea04f5ae.tar.xz
netmount: add checks for rpc.idmapd for nfs4 filesystems
Reported-by: <devurandom@gmx.net> X-Gentoo-Bug: 427996 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=427996
-rw-r--r--init.d/netmount.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/init.d/netmount.in b/init.d/netmount.in
index 963ad26..2259783 100644
--- a/init.d/netmount.in
+++ b/init.d/netmount.in
@@ -19,6 +19,21 @@ need_portmap()
return 1
}
+need_idmap()
+{
+ local opts=
+ local IFS="
+"
+ set -- $(fstabinfo --options --fstype nfs4)
+ for opts; do
+ case ,$opts, in
+ *,noauto,*|*,nolock,*);;
+ *) return 0;;
+ esac
+ done
+ return 1
+}
+
depend()
{
# Only have portmap as a dependency if there is a nfs mount in fstab
@@ -31,6 +46,12 @@ depend()
|| pmap="$pmap portmap"
fi
+ # Only have rpc.idmapd as a dependency if there is a nfs4 mount in fstab
+ # that is set to mount at boot
+ if need_idmap; then
+ pmap="$pmap rpc.idmapd"
+ fi
+
config /etc/fstab
need net $pmap
use afc-client amd autofs openvpn