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.
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
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=$?
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