diff options
Diffstat (limited to 'main/nfs-utils/nfsmount.initd')
-rw-r--r-- | main/nfs-utils/nfsmount.initd | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/main/nfs-utils/nfsmount.initd b/main/nfs-utils/nfsmount.initd index 6021404889..12c7d786a0 100644 --- a/main/nfs-utils/nfsmount.initd +++ b/main/nfs-utils/nfsmount.initd @@ -1,20 +1,25 @@ #!/sbin/openrc-run -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfsmount.initd,v 1.13 2009/01/31 22:15:02 vapier Exp $ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs depend() { local myneed="" if [ -e /etc/fstab ] ; then - awk '!/^[[:space:]]*#/ && $3 == "nfs4" { exit ($4 ~ /sec=krb/ ? 10 : 20) }' /etc/fstab - local ret=$? - [ ${ret} -eq 10 ] && myneed="${myneed} rpc.gssd" - [ ${ret} -eq 20 ] && myneed="${myneed} rpc.idmapd" + myneed="${myneed} $( + awk '!/^[[:space:]]*#/ && ($3 == "nfs" || $3 == "nfs4") { + if ($3 == "nfs4") + idmapd = "rpc.idmapd" + if ($4 ~ /sec=(krb|spkm)/) + gssd = "rpc.gssd" + } + END { print idmapd " " gssd } + ' /etc/fstab + )" fi config /etc/fstab - need net portmap rpc.statd ${myneed} + need portmap rpc.statd ${myneed} use ypbind dns rpc.idmapd rpc.gssd } |