summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-08-07 21:13:02 +0000
committerMike Frysinger <vapier@gentoo.org>2010-08-07 21:13:02 +0000
commit5de78cee650e8bf3c52df894fd84623160eee95c (patch)
tree7c7c5d525de2e2ea6bba00d63fbc75ab572bf07a /net-fs/nfs-utils
parentRemove duplication between ebuild/wrapper. (diff)
downloadgentoo-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')
-rw-r--r--net-fs/nfs-utils/ChangeLog6
-rwxr-xr-xnet-fs/nfs-utils/files/nfs.initd16
2 files changed, 17 insertions, 5 deletions
diff --git a/net-fs/nfs-utils/ChangeLog b/net-fs/nfs-utils/ChangeLog
index 127facf22de5..b864c486bbea 100644
--- a/net-fs/nfs-utils/ChangeLog
+++ b/net-fs/nfs-utils/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-fs/nfs-utils
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.171 2010/08/02 11:08:49 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.172 2010/08/07 21:13:01 vapier Exp $
+
+ 07 Aug 2010; Mike Frysinger <vapier@gentoo.org> files/nfs.initd:
+ Port logic over for detecting rpc.gssd needs in nfs init.d script #330795 by
+ Jared.
02 Aug 2010; Diego E. Pettenò <flameeyes@gentoo.org> files/nfs.initd:
Only require rpc.svcgssd if sec=krb is used rather than sec=sys (default).
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}