]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
nfs-common.init, nfs-kernel-server.init: Add warning when portmap is not running...
authorLuk Claes <luk@debian.org>
Sun, 13 Mar 2011 17:52:57 +0000 (18:52 +0100)
committerLuk Claes <luk@debian.org>
Sun, 13 Mar 2011 17:56:09 +0000 (18:56 +0100)
When portmap (or rpcbind) are not running, don't try to start statd, nfsd or mountd, but warn instead that portmap is not running. This means installing nfs-common or nfs-kernel-server would succeed even if the daemons are not started.

debian/changelog
debian/nfs-common.init
debian/nfs-kernel-server.init

index 808c96fc9812db6fd7ec7a319d3a9819c3b93a3d..e32b078c097cb9730b2998bcd89cf98315460366 100644 (file)
@@ -1,11 +1,16 @@
 nfs-utils (1:1.2.2-5) UNRELEASED; urgency=low
 
+  [ Ben Hutchings ]
   * mount.nfs.man, nfs.man: Update distinction between fstypes
     (Closes: #575503)
   * nfs-kernel-server.init: Require any installed name server ($named) to
     start before nfs-kernel-server (Closes: #598493)
 
- -- Ben Hutchings <ben@decadent.org.uk>  Sat, 02 Oct 2010 20:05:53 +0100
+  [ Luk Claes ]
+  * nfs-common.init, nfs-kernel-server.init: Add warning when portmap is
+    not running (Closes: #612002)
+
+ -- Luk Claes <luk@debian.org>  Sun, 13 Mar 2011 18:49:29 +0100
 
 nfs-utils (1:1.2.2-4) unstable; urgency=low
 
index 9f5ebf5bbca87ae2e67cdd453b449e0aa9a771ce..32e89c8373e783cfdcd6b55f3108658ad7b53c85 100644 (file)
@@ -136,6 +136,16 @@ case "$1" in
 
        if [ "$NEED_STATD" = yes ]; then
            log_progress_msg "statd"
+           
+           # See if portmap or rpcbind are running
+           lsof -i :111 >/dev/null
+           RET=$?
+           if [ $RET != 0 ]; then
+               echo
+               log_warning_msg "Not starting: portmap daemon is not running"
+               exit 0
+           fi
+
            start-stop-daemon --start --oknodo --quiet \
                --exec $PREFIX/sbin/rpc.statd -- $STATDOPTS
            RET=$?
index 155effd5c2885e8f805d2f836c4624a1a1a2b361..b7a9633151a0a79332dcf41b222c6a5f7ba11fea 100644 (file)
@@ -82,6 +82,16 @@ case "$1" in
 
                log_daemon_msg "Starting $DESC"
                log_progress_msg "nfsd"
+               
+               # See if portmap or rpcbind are running
+               lsof -i :111 >/dev/null
+               RET=$?
+               if [ $RET != 0 ]; then
+                   echo
+                   log_warning_msg "Not starting: portmap daemon is not running"
+                   exit 0
+               fi
+
                start-stop-daemon --start --oknodo --quiet \
                    --nicelevel $RPCNFSDPRIORITY \
                    --exec $PREFIX/sbin/rpc.nfsd -- $RPCNFSDCOUNT