SOURCES: nfs.init, nfsfs.init - merged from AC-branch
baggins
baggins at pld-linux.org
Mon May 8 18:02:33 CEST 2006
Author: baggins Date: Mon May 8 16:02:33 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- merged from AC-branch
---- Files affected:
SOURCES:
nfs.init (1.29 -> 1.30) , nfsfs.init (1.25 -> 1.26)
---- Diffs:
================================================================
Index: SOURCES/nfs.init
diff -u SOURCES/nfs.init:1.29 SOURCES/nfs.init:1.30
--- SOURCES/nfs.init:1.29 Thu Dec 8 02:02:49 2005
+++ SOURCES/nfs.init Mon May 8 18:02:28 2006
@@ -37,6 +37,10 @@
[ -x /usr/sbin/rpc.mountd ] || exit 0
[ -f /etc/exports ] || exit 0
+if ! is_yes "$NFS4" ; then
+ RPCMOUNTOPTIONS="$RPCMOUNTOPTIONS --no-nfs-version 4"
+fi
+
RETVAL=0
# See how we were called.
case "$1" in
@@ -44,37 +48,31 @@
# Check if the service is already running?
if [ ! -f /var/lock/subsys/nfs ]; then
# Start daemons.
- if [ "$NFSDTYPE" = "U" ]; then
- msg_starting "NFS mountd"
- daemon rpc.mountd $RPCMOUNTOPTIONS
- msg_starting "NFS daemon"
- daemon rpc.nfsd $RPCNFSDCOUNT
- else
- modprobe -s nfsd > /dev/null 2>&1
- if [ "$(kernelverser)" -ge "002006" ]; then
- grep -q nfsd /proc/filesystems && \
- ! grep -q nfsd /proc/mounts && \
- run_cmd "Mounting /proc/fs/nfsd filesystem" mount -t nfsd nfsd /proc/fs/nfsd
- grep -q rpc_pipefs /proc/filesystems && \
- ! grep -q rpc_pipefs /proc/mounts && \
- run_cmd "Mounting /var/lib/nfs/rpc_pipefs filesystem" mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
- fi
- msg_starting "NFS exportfs"
- daemon /usr/sbin/exportfs -r
- msg_starting "NFS mountd"
- daemon rpc.mountd $RPCMOUNTOPTIONS
- if (grep -q rpc_pipefs /proc/filesystems); then
- if [ ! -f /var/lock/subsys/idmapd ]; then
- msg_starting "NFS idmapd"
- daemon rpc.idmapd $RPCIDMAPOPTIONS
- [ $? = 0 ] && touch /var/lock/subsys/idmapd
- fi
- msg_starting "NFS svcgssd"
- daemon rpc.svcgssd $RPCSVCGSSOPTIONS
+ modprobe -s nfsd > /dev/null 2>&1
+ if [ "$(kernelverser)" -ge "002006" ]; then
+ grep -q nfsd /proc/filesystems && \
+ ! grep -q nfsd /proc/mounts && \
+ run_cmd "Mounting /proc/fs/nfsd filesystem" mount -t nfsd nfsd /proc/fs/nfsd
+ fi
+ msg_starting "NFS exportfs"
+ daemon /usr/sbin/exportfs -r
+ msg_starting "NFS mountd"
+ daemon rpc.mountd $RPCMOUNTOPTIONS
+ if is_yes "$NFS4" ; then
+ if (grep -q rpc_pipefs /proc/filesystems); then
+ ! grep -q rpc_pipefs /proc/mounts && \
+ run_cmd "Mounting /var/lib/nfs/rpc_pipefs filesystem" mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+ if [ ! -f /var/lock/subsys/idmapd ]; then
+ msg_starting "NFS idmapd"
+ daemon rpc.idmapd $RPCIDMAPOPTIONS
+ [ $? = 0 ] && touch /var/lock/subsys/idmapd
fi
- msg_starting "NFS daemon"
- daemon rpc.nfsd $RPCNFSDCOUNT
+ msg_starting "NFS svcgssd"
+ daemon rpc.svcgssd $RPCSVCGSSOPTIONS
+ fi
fi
+ msg_starting "NFS daemon"
+ daemon rpc.nfsd $RPCNFSDCOUNT
touch /var/lock/subsys/nfs
else
msg_already_running "NFS"
@@ -83,16 +81,11 @@
stop)
if [ -f /var/lock/subsys/nfs ]; then
# Stop daemons.
- if [ "$NFSDTYPE" = "U" ]; then
- msg_stopping "NFS mountd"
- killproc rpc.mountd
- msg_stopping "NFS daemon"
- killproc rpc.nfsd
- else
- msg_stopping "NFS mountd"
- killproc rpc.mountd
- msg_stopping "NFS daemon"
- killproc nfsd -QUIT
+ msg_stopping "NFS mountd"
+ killproc rpc.mountd
+ msg_stopping "NFS daemon"
+ killproc nfsd -QUIT
+ if is_yes "$NFS4" ; then
if (grep -q rpc_pipefs /proc/filesystems); then
msg_stopping "NFS svcgssd"
killproc rpc.svcgssd
@@ -102,9 +95,9 @@
rm -f /var/lock/subsys/idmapd
fi
fi
- msg_stopping "NFS"
- daemon /usr/sbin/exportfs -au
fi
+ msg_stopping "NFS"
+ daemon /usr/sbin/exportfs -au
rm -f /var/lock/subsys/nfs
else
msg_not_running "NFS"
@@ -113,11 +106,7 @@
status)
status rpc.mountd
RETVAL=$?
- if [ "$NFSDTYPE" = "U" ]; then
- status rpc.nfsd
- else
- status nfsd
- fi
+ status nfsd
RET=$?
[ $RETVAL -eq 0 ] && RETVAL=$RET
;;
@@ -127,15 +116,10 @@
exit $?
;;
force-reload)
- if [ "$NFSDTYPE" = "U" ]; then
- $0 restart
- else
- $0 reload
- fi
+ $0 reload
exit $?
;;
reload)
- [ "$NFSDTYPE" = "U" ] && exit 0
if [ -f /var/lock/subsys/nfs ]; then
msg_reloading "NFS"
busy
@@ -148,7 +132,6 @@
fi
;;
probe)
- [ "$NFSDTYPE" = "U" ] && exit 0
if [ ! -f /var/lock/subsys/nfs ]; then
echo start
exit 0
================================================================
Index: SOURCES/nfsfs.init
diff -u SOURCES/nfsfs.init:1.25 SOURCES/nfsfs.init:1.26
--- SOURCES/nfsfs.init:1.25 Fri May 27 17:31:10 2005
+++ SOURCES/nfsfs.init Mon May 8 18:02:28 2006
@@ -23,6 +23,9 @@
# Get network config
. /etc/sysconfig/network
+# Get service config
+[ -f /etc/sysconfig/nfsclient ] && . /etc/sysconfig/nfsclient
+
# Check that networking is up.
if is_yes "${NETWORKING}"; then
if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
@@ -33,25 +36,26 @@
exit 0
fi
-
# See how we were called.
case "$1" in
start)
if [ ! -f /var/lock/subsys/nfsfs ]; then
- if [ "$NFSDTYPE" != "U" ] && grep -q nfs4 /proc/filesystems; then
- modprobe -s nfs > /dev/null 2>&1
- if [ "$(kernelverser)" -ge "002006" ]; then
- grep -q rpc_pipefs /proc/filesystems && \
- ! grep -q rpc_pipefs /proc/mounts && \
- run_cmd "Mounting /var/lib/nfs/rpc_pipefs filesystem" mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+ if is_yes "$NFS4" ; then
+ if grep -q nfs4 /proc/filesystems; then
+ modprobe -s nfs > /dev/null 2>&1
+ if [ "$(kernelverser)" -ge "002006" ]; then
+ grep -q rpc_pipefs /proc/filesystems && \
+ ! grep -q rpc_pipefs /proc/mounts && \
+ run_cmd "Mounting /var/lib/nfs/rpc_pipefs filesystem" mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+ fi
+ if [ ! -f /var/lock/subsys/idmapd ]; then
+ msg_starting "NFS idmapd"
+ daemon rpc.idmapd $RPCIDMAPOPTIONS
+ fi
+ msg_starting "NFS gssd"
+ daemon rpc.gssd -m $RPCGSSOPTIONS
+ fi
fi
- if [ ! -f /var/lock/subsys/idmapd ]; then
- msg_starting "NFS idmapd"
- daemon rpc.idmapd $RPCIDMAPOPTIONS
- fi
- msg_starting "NFS gssd"
- daemon rpc.gssd -m $RPCGSSOPTIONS
- fi
run_cmd "Mounting NFS filesystems" mount -a -t nfs
touch /var/lock/subsys/nfsfs
else
@@ -78,14 +82,16 @@
retry=$(($retry-1))
done
ok
- if [ "$NFSDTYPE" != "U" ] && grep -q nfs4 /proc/filesystems; then
- msg_stopping "NFS gssd"
- killproc rpc.gssd
- if [ -f /var/lock/subsys/idmapd -a ! -f /var/lock/subsys/nfs ]; then
- msg_stopping "NFS idmapd"
- killproc rpc.idmapd
- rm -f /var/lock/subsys/idmapd
- fi
+ if is_yes "$NFS4" ; then
+ if grep -q nfs4 /proc/filesystems; then
+ msg_stopping "NFS gssd"
+ killproc rpc.gssd
+ if [ -f /var/lock/subsys/idmapd -a ! -f /var/lock/subsys/nfs ]; then
+ msg_stopping "NFS idmapd"
+ killproc rpc.idmapd
+ rm -f /var/lock/subsys/idmapd
+ fi
+ fi
fi
rm -f /var/lock/subsys/nfsfs
;;
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/nfs.init?r1=1.29&r2=1.30&f=u
http://cvs.pld-linux.org/SOURCES/nfsfs.init?r1=1.25&r2=1.26&f=u
More information about the pld-cvs-commit
mailing list