]> git.pld-linux.org Git - packages/nfs-utils.git/commitdiff
- cleaning
authorankry <ankry@pld-linux.org>
Mon, 5 May 2003 00:06:53 +0000 (00:06 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    nfs.init -> 1.14
    nfsfs.init -> 1.11
    nfslock.init -> 1.5

nfs.init
nfsfs.init
nfslock.init

index ffbb328f6733eb1d6bd8a680dec1ade0acc5650b..d195018d5152fefe0967d7a0f236baa49bf42e81 100644 (file)
--- a/nfs.init
+++ b/nfs.init
 [ -f /etc/sysconfig/nfsd ] && . /etc/sysconfig/nfsd
 
 # Check that networking is up.
-if is_no "${NETWORKING}"; then
-       msg_Network_Down NFSD
-       exit 1
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network ]; then
+               msg_network_down NFSD
+               exit 1
+       fi
+else
+       exit 0
 fi
 
 if [ -x /sbin/pidof ] && [ "$1" != "stop" ]; then
-       [ -z "`/sbin/pidof portmap`" ] && echo "Error: portmap isn't running" && exit 0
+       [ -z "`/sbin/pidof portmap`" ] && nls "Error: portmap isn't running" && exit 0
 fi
 
 # Sanity checks
@@ -39,7 +43,7 @@ case "$1" in
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/nfs ]; then
                # Start daemons.
-               if [ "$NFSDTYPE" = "U" ] ; then
+               if [ "$NFSDTYPE" = "U" ] ; then
                        msg_starting "NFS mountd"
                        daemon rpc.mountd
                        msg_starting "NFS daemon"
@@ -54,14 +58,14 @@ case "$1" in
                fi
                touch /var/lock/subsys/nfs
        else
-               msg_Already_Running "NFS"
+               msg_already_running "NFS"
                exit 1
        fi
        ;;
   stop)
        if [ -f /var/lock/subsys/nfs ]; then
                # Stop daemons.
-               if [ "$NFSDTYPE" = "U" ] ; then
+               if [ "$NFSDTYPE" = "U" ] ; then
                        msg_stopping "NFS mountd"
                        killproc rpc.mountd
                        msg_stopping "NFS daemon"
@@ -76,13 +80,13 @@ case "$1" in
                fi
                rm -f /var/lock/subsys/nfs
        else
-               msg_Not_Running "NFS"
+               msg_not_running "NFS"
                exit 1
        fi
        ;;
   status)
        status rpc.mountd
-       if [ "$NFSDTYPE" = "U" ] ; then
+       if [ "$NFSDTYPE" = "U" ] ; then
                status rpc.nfsd
        else
                status nfsd
@@ -100,15 +104,18 @@ case "$1" in
   probe)
        [ "$NFSDTYPE" = "U" ] && exit 0
        if [ ! -f /var/lock/subsys/nfs ] ; then
-         echo start; exit 0
+               echo start
+               exit 0
        fi
        /sbin/pidof rpc.mountd >/dev/null 2>&1; MOUNTD="$?"
        /sbin/pidof nfsd >/dev/null 2>&1; NFSD="$?"
        if [ $MOUNTD = 1 -o $NFSD = 1 ] ; then
-         echo restart; exit 0
+               echo restart
+               exit 0
        fi
        if [ /etc/exports -nt /var/lock/subsys/nfs ] ; then
-         echo reload; exit 0
+               echo reload
+               exit 0
        fi
        ;;
   *)
index 643f0e834295e8541620dc765652ff604ce1cf67..6cdba951db9a1e5b9cdc3197a95960551f0feeee 100644 (file)
@@ -1,40 +1,45 @@
 #!/bin/sh
 #
-# nfsfs         Mount NFS filesystems.
+# nfsfs                Mount NFS filesystems.
 #
-# Version:      @(#) /etc/init.d/skeleton 1.01 26-Oct-1993
+# Version:     @(#) /etc/init.d/skeleton 1.01 26-Oct-1993
 #
-# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
+# Author:      Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 #
-# chkconfig: 345 15 88
-# description: Mounts and unmounts all Network File System (NFS) \
-#              mount points.
+# chkconfig:   345 15 88
+# description: Mounts and unmounts all Network File System (NFS) \
+#              mount points.
 #
 # $Id$
 
 # Source networking configuration.
 if [ ! -f /etc/sysconfig/network ]; then
-    exit 0
+       exit 0
 fi
 
 # Source function library.
 . /etc/rc.d/init.d/functions
 
+# Get network config
 . /etc/sysconfig/network
 
 # Check that networking is up.
-if is_no "${NETWORKING}"; then
-       msg_network_down nfsfs
-       exit 1
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network ]; then
+               msg_network_down nfsfs
+               exit 1
+       fi
+else
+       exit 0
 fi
 
+
 # See how we were called.
 case "$1" in
   start)
        show "Mounting NFS filesystems"
        busy
        mount -a -t nfs
-       deltext
        ok
        touch /var/lock/subsys/nfsfs
        ;;
@@ -56,7 +61,6 @@ case "$1" in
                umount -a -f -t nfs
                remaining=$(awk '$3 == "nfs" {print $2}' $fsfile)
        done
-       deltext
        ok
        rm -f /var/lock/subsys/nfsfs
        ;;
@@ -85,4 +89,3 @@ case "$1" in
 esac
 
 exit 0
-
index 97354c0fded76b61e972041169d635e70c02a7f3..f6281e5414136979a78de365d7c5c83356557f47 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
-# nfslock       This shell script takes care of starting and stopping
-#               the NFS file locking service.
+# nfslock      This shell script takes care of starting and stopping
+#              the NFS file locking service.
 #
 # chkconfig:   345 61 19
 # description: NFS is a popular protocol for file sharing across \
 [ -f /etc/sysconfig/nfslock ] && . /etc/sysconfig/nfslock
 
 # Check that networking is up.
-if is_no "${NETWORKING}"; then
-       msg_Network_Down "NFS lockd"
-       exit 1
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network ]; then
+               msg_network_down "NFS lockd"
+               exit 1
+       fi
+else
+       exit 0
 fi
 
 if [ -x /sbin/pidof ] && [ "$1" != "stop" ]; then
@@ -41,18 +45,18 @@ case "$1" in
                daemon rpc.statd
                touch /var/lock/subsys/nfslock
        else
-               msg_Already_Running "NFS statd"
+               msg_already_running "NFS statd"
                exit 1
        fi
        ;;
   stop)
-       if [ -f /var/lock/subsys/nfslock ]; then
+       if [ -f /var/lock/subsys/nfslock ]; then
                # Stop daemons.
                msg_stopping "NFS statd"
                killproc rpc.statd
                rm -f /var/lock/subsys/nfslock
        else
-               msg_Not_Running "NFS statd"
+               msg_not_running "NFS statd"
                exit 1
        fi
        ;;
@@ -60,20 +64,22 @@ case "$1" in
        status rpc.statd
        ;;
   restart)
-       $0 stop
+       $0 stop
        $0 start
        ;;
   probe)
        if [ ! -f /var/lock/subsys/nfslock ] ; then
-         echo start; exit 0
+               echo start
+               exit 0
        fi
        /sbin/pidof rpc.statd >/dev/null 2>&1; STATD="$?"
        if [ $STATD = 1 ] ; then
-         echo restart; exit 0
+               echo restart
+               exit 0
        fi
        ;;
   *)
-       msg_Usage "$0 {start|stop|status|restart}"
+       msg_usage "$0 {start|stop|restart|probe|status}"
        exit 1
 esac
 
This page took 0.10826 seconds and 4 git commands to generate.