diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-08-07 21:13:02 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-08-07 21:13:02 +0000 |
commit | 5de78cee650e8bf3c52df894fd84623160eee95c (patch) | |
tree | 7c7c5d525de2e2ea6bba00d63fbc75ab572bf07a /net-fs/nfs-utils/files | |
parent | Remove duplication between ebuild/wrapper. (diff) | |
download | gentoo-2-5de78cee650e8bf3c52df894fd84623160eee95c.tar.gz gentoo-2-5de78cee650e8bf3c52df894fd84623160eee95c.tar.bz2 gentoo-2-5de78cee650e8bf3c52df894fd84623160eee95c.zip |
Port logic over for detecting rpc.gssd needs in nfs init.d script #330795 by Jared.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'net-fs/nfs-utils/files')
-rwxr-xr-x | net-fs/nfs-utils/files/nfs.initd | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/net-fs/nfs-utils/files/nfs.initd b/net-fs/nfs-utils/files/nfs.initd index e0c4821738cc..b8e292caf101 100755 --- a/net-fs/nfs-utils/files/nfs.initd +++ b/net-fs/nfs-utils/files/nfs.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.21 2010/08/02 11:08:49 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.22 2010/08/07 21:13:02 vapier Exp $ opts="reload" @@ -18,9 +18,17 @@ smnotify=/usr/sbin/sm-notify depend() { local myneed="" if [ -e /etc/exports ] ; then - if awk '!/^[[:space:]]*#/ && $2 ~ /sec=krb5/ { found=1; nextfile } END { exit !found }' /etc/exports ; then - myneed="${myneed} rpc.svcgssd" - fi + # XXX: no way to detect NFSv4 is desired and so need rpc.idmapd + myneed="${myneed} $( + awk '!/^[[:space:]]*#/ { + # clear the path to avoid spurious matches + $1 = ""; + if ($0 ~ /[(][^)]*sec=(krb|spkm)[^)]*[)]/) { + print "rpc.gssd" + exit 0 + } + }' /etc/exports + )" fi config /etc/exports need portmap rpc.statd ${myneed} ${NFS_NEEDED_SERVICES} |