summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-12-30 19:25:18 +0000
committerMike Frysinger <vapier@gentoo.org>2007-12-30 19:25:18 +0000
commitdfb02ed81335cb42d902280f4807c7df3e08fcc0 (patch)
tree35364b3a42dde2f3798eb77ef5615bfa3ed9fda9 /net-fs/nfs-utils/files
parentVersion bump adding patch for bug #203777. Remove old version. (diff)
downloadgentoo-2-dfb02ed81335cb42d902280f4807c7df3e08fcc0.tar.gz
gentoo-2-dfb02ed81335cb42d902280f4807c7df3e08fcc0.tar.bz2
gentoo-2-dfb02ed81335cb42d902280f4807c7df3e08fcc0.zip
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.
(Portage version: 2.1.4_rc12)
Diffstat (limited to 'net-fs/nfs-utils/files')
-rwxr-xr-xnet-fs/nfs-utils/files/nfs.initd8
-rwxr-xr-xnet-fs/nfs-utils/files/nfsmount.initd12
2 files changed, 12 insertions, 8 deletions
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