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
This commit is contained in:
parent
5092595835
commit
3863c11be5
@ -19,6 +19,21 @@ need_portmap()
|
|||||||
return 1
|
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()
|
depend()
|
||||||
{
|
{
|
||||||
# Only have portmap as a dependency if there is a nfs mount in fstab
|
# Only have portmap as a dependency if there is a nfs mount in fstab
|
||||||
@ -31,6 +46,12 @@ depend()
|
|||||||
|| pmap="$pmap portmap"
|
|| pmap="$pmap portmap"
|
||||||
fi
|
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
|
config /etc/fstab
|
||||||
need net $pmap
|
need net $pmap
|
||||||
use afc-client amd autofs openvpn
|
use afc-client amd autofs openvpn
|
||||||
|
Loading…
Reference in New Issue
Block a user