summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-03-15 05:43:49 +0000
committerMike Frysinger <vapier@gentoo.org>2005-03-15 05:43:49 +0000
commit2c783c5644b6cc1844520883de40c535424b77c7 (patch)
treee6ec6d54920bc72f3e75dd74d57934f45dbb9c78 /net-fs/nfs-utils/files
parentrev bump. more USE flag checks to ebuild. depend on working ffmpeg (diff)
downloadgentoo-2-2c783c5644b6cc1844520883de40c535424b77c7.tar.gz
gentoo-2-2c783c5644b6cc1844520883de40c535424b77c7.tar.bz2
gentoo-2-2c783c5644b6cc1844520883de40c535424b77c7.zip
Add support for integrated idmapd #71607 by Keith M Wesolowski.
(Portage version: 2.0.51.19)
Diffstat (limited to 'net-fs/nfs-utils/files')
-rw-r--r--net-fs/nfs-utils/files/digest-nfs-utils-1.0.7-r1 (renamed from net-fs/nfs-utils/files/digest-nfs-utils-1.0.7)0
-rwxr-xr-xnet-fs/nfs-utils/files/nfs50
-rw-r--r--net-fs/nfs-utils/files/nfs.confd5
3 files changed, 45 insertions, 10 deletions
diff --git a/net-fs/nfs-utils/files/digest-nfs-utils-1.0.7 b/net-fs/nfs-utils/files/digest-nfs-utils-1.0.7-r1
index 0b0ec24d0c0b..0b0ec24d0c0b 100644
--- a/net-fs/nfs-utils/files/digest-nfs-utils-1.0.7
+++ b/net-fs/nfs-utils/files/digest-nfs-utils-1.0.7-r1
diff --git a/net-fs/nfs-utils/files/nfs b/net-fs/nfs-utils/files/nfs
index 566fcea761b9..489eaec9d7bf 100755
--- a/net-fs/nfs-utils/files/nfs
+++ b/net-fs/nfs-utils/files/nfs
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs,v 1.9 2005/03/15 05:23:38 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs,v 1.10 2005/03/15 05:43:49 vapier Exp $
#---------------------------------------------------------------------------
# This script starts/stops the following
@@ -17,26 +17,56 @@ opts="reload"
# This variable is used for controlling whether or not to run exportfs -ua;
# see stop() for more information
-restarting=yes
+restarting=no
# The binary locations
exportfs=/usr/sbin/exportfs
statd=/sbin/rpc.statd
+idmapd=/usr/sbin/rpc.idmapd
rquotad=/usr/sbin/rpc.rquotad
nfsd=/usr/sbin/rpc.nfsd
mountd=/usr/sbin/rpc.mountd
depend() {
- use ypbind
+ use ypbind net
+ need portmap
+ after quota
+}
+
+start_idmapd() {
+ [[ ! -x ${idmapd} ]] && return 0
- local myneed="net portmap"
- if [ -x /sbin/idmapd ] ; then
- if grep -q rpc_pipefs /proc/filesystems &>/dev/null; then
- myneed="${myneed} idmapd"
+ if grep -q rpc_pipefs /proc/filesystems ; then
+ if ! grep -q "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts ; then
+ [[ ! -d /var/lib/nfs/rpc_pipefs ]] && mkdir -p /var/lib/nfs/rpc_pipefs
+ ebegin "Mounting RPC pipefs"
+ mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+ eend $?
fi
fi
- need ${myneed}
- after quota
+
+ ebegin "Starting idmapd"
+ ${idmapd} ${RPCIDMAPDOPTS}
+ eend $?
+}
+
+stop_idmapd() {
+ [[ ! -x ${idmapd} ]] && return 0
+
+ ebegin "Stopping idmapd"
+ start-stop-daemon --stop --quiet --exec ${idmapd}
+ ret=$?
+ eend ${ret}
+
+ if [[ $restarting == "no" ]] ; then
+ if grep -q "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts ; then
+ ebegin "Unmounting RPC pipefs"
+ umount /var/lib/nfs/rpc_pipefs
+ eend $?
+ fi
+ fi
+
+ return ${ret}
}
start_statd() {
@@ -81,6 +111,7 @@ start() {
fi
# now that nfsd is mounted inside /proc, we can safely start mountd later
+ start_idmapd
start_statd
# Exportfs likes to hang if networking isn't working.
@@ -157,6 +188,7 @@ stop() {
fi
stop_statd
+ stop_idmapd
}
reload() {
diff --git a/net-fs/nfs-utils/files/nfs.confd b/net-fs/nfs-utils/files/nfs.confd
index 77bea666e568..346158174e8e 100644
--- a/net-fs/nfs-utils/files/nfs.confd
+++ b/net-fs/nfs-utils/files/nfs.confd
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.confd,v 1.7 2004/10/09 18:51:26 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.confd,v 1.8 2005/03/15 05:43:49 vapier Exp $
# Config file for /etc/init.d/nfs
@@ -18,5 +18,8 @@ RPCMOUNTDOPTS=""
# ex. RPCSTATDOPTS="-p 32765 -o 32766"
RPCSTATDOPTS=""
+# Options to pass to rpc.idmapd
+RPCIDMAPDOPTS=""
+
# Timeout (in seconds) for exportfs
EXPORTFSTIMEOUT=30