summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-fs/nfs-utils/ChangeLog7
-rwxr-xr-xnet-fs/nfs-utils/files/nfs.initd8
-rwxr-xr-xnet-fs/nfs-utils/files/nfsmount.initd12
3 files changed, 18 insertions, 9 deletions
diff --git a/net-fs/nfs-utils/ChangeLog b/net-fs/nfs-utils/ChangeLog
index b9b1b84b6f5f..22834060c715 100644
--- a/net-fs/nfs-utils/ChangeLog
+++ b/net-fs/nfs-utils/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-fs/nfs-utils
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.114 2007/12/30 09:29:20 drac Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.115 2007/12/30 19:25:17 vapier Exp $
+
+ 30 Dec 2007; Mike Frysinger <vapier@gentoo.org> files/nfs.initd,
+ files/nfsmount.initd:
+ Make sure /etc/exports and /etc/fstab exist to account for the stupid cases
+ of running these init.d scripts without anything useful to do.
30 Dec 2007; Samuli Suominen <drac@gentoo.org> nfs-utils-1.1.0-r1.ebuild:
amd64 stable wrt #201552
diff --git a/net-fs/nfs-utils/files/nfs.initd b/net-fs/nfs-utils/files/nfs.initd
index 93480ddd6752..4b638ca798ad 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-2007 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.8 2007/12/30 17:43:27 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.9 2007/12/30 19:25:18 vapier Exp $
opts="reload"
@@ -17,8 +17,10 @@ smnotify=/usr/sbin/sm-notify
depend() {
local myneed=""
- if ! awk '!/^[[:space:]]*#/ && $2 ~ /sec=/ { exit 1 }' /etc/exports ; then
- myneed="${myneed} rpc.gssd"
+ if [ -e /etc/exports ] ; then
+ if awk '!/^[[:space:]]*#/ && $2 ~ /sec=/ { exit 0 } END { exit 1 }' /etc/exports ; then
+ myneed="${myneed} rpc.gssd"
+ fi
fi
config /etc/exports
need portmap rpc.statd ${myneed}
diff --git a/net-fs/nfs-utils/files/nfsmount.initd b/net-fs/nfs-utils/files/nfsmount.initd
index 2baa2e03a022..7d30e5d1019b 100755
--- a/net-fs/nfs-utils/files/nfsmount.initd
+++ b/net-fs/nfs-utils/files/nfsmount.initd
@@ -1,16 +1,18 @@
#!/sbin/runscript
# Copyright 1999-2007 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.6 2007/12/30 17:43:27 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfsmount.initd,v 1.7 2007/12/30 19:25:18 vapier Exp $
[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
depend() {
local myneed=""
- awk '!/^[[:space:]]*#/ && $3 == "nfs4" { exit ($4 ~ /sec=krb/ ? 1 : 2) }' /etc/fstab
- local ret=$?
- [ ${ret} -ne 0 ] && myneed="${myneed} rpc.idmapd"
- [ ${ret} -eq 1 ] && myneed="${myneed} rpc.gssd"
+ if [ -e /etc/fstab ] ; then
+ awk '!/^[[:space:]]*#/ && $3 == "nfs4" { exit ($4 ~ /sec=krb/ ? 1 : 2) }' /etc/fstab
+ local ret=$?
+ [ ${ret} -ne 0 ] && myneed="${myneed} rpc.idmapd"
+ [ ${ret} -eq 1 ] && myneed="${myneed} rpc.gssd"
+ fi
config /etc/fstab
need net portmap rpc.statd ${myneed}
use ypbind dns rpc.idmapd rpc.gssd