Your message dated Sat, 21 Apr 2012 00:52:18 +0100
with message-id <[email protected]>
and subject line Close old and unfixable sysvinit bugs
has caused the Debian Bug report #39023,
regarding Allow persitent behavior when handling NFS mounting
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
39023: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=39023
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: sysvinit
Version: 2.76-3
Priority: wishlist

        I have some machines that have /home mounted by NFS, and sometimes
they get rebooted (both server and clients) ath the same time (maybe
electric failure, although its not too common). The problem is since
server has higher load than clients, clients startup the nfs mount script
before the server has launched any daemon (a race condition).
        I do not want the clients to boot if this happens, so I have
fiddled around with the /etc/init.d/mountnfs.sh script, and added some
nice things (I hope I have done it right, at least it seems it works) to
handle "persistent" behavior.
        I have attached the resulting script to this mail for your
consideration on including it in the scripts provided by your package
(possibly with the variable that affects this behavior set to 'no' but
thus allowing anyone to set it to yes if they are in dire need of it :)

        Regards


        Javier Fernandez-Sanguino Peña
        Debian developer
        [email protected]
#
# mountnfs.sh	Now that TCP/IP is configured, mount the NFS file
#		systems in /etc/fstab if needed. If possible,
#		start the portmapper before mounting (this is needed for
#		Linux 2.1.x and up).
#
# Version:	@(#)mountnfs.sh  1.11  05-Oct-1998  [email protected]
#

. /etc/default/rcS

#
#	Run in a subshell because of I/O redirection.
#
test -f /etc/fstab && (

#
#	Read through fstab line by line. If it is NFS, set the flag
#	for mounting NFS file systems. If any NFS partition is found and it
#	not mounted with the nolock option, we start the portmapper.
#

portmap=no
mount_nfs=no

# nfs options
retrytime=10
msgfail="\a[[0;1;31;51mCannot connect to remote hosts\nPress Ctrl+C to abort"
alwaysmount=yes

while read device mountpt fstype options
do
	if [ "$fstype" = nfs ]
	then
		mount_nfs=yes
		case "$options" in
			*nolock*)
				;;
			*)
				portmap=yes
				;;
		esac
	fi
done

exec 0>&1

if [ "$portmap" = yes ]
then
	if [ -x /sbin/portmap ]
	then
		echo -n "Starting portmapper... "
		start-stop-daemon --start --quiet --exec /sbin/portmap
		sleep 2
	fi
fi

if [ "$mount_nfs" = yes ]
then
	echo "Mounting remote filesystems..."
	if [ "$alwaysmount" = yes ]; then
                while ! mount -a -t nfs; do 
                        echo -e $msgfail
                        sleep $retrytime;
                done
        else
                mount -a -t nfs
        fi
fi

) < /etc/fstab


--- End Message ---
--- Begin Message ---
This bug is being closed as part of a cleanup of the old bug
reports in the sysvinit package, in an attempt to make it easier
to address the bug reports which actually are fixable.  Some
reasons:

- Not a bug and/or it's a patch which will not be applied
- It will not be fixed, ever for various reasons
- Problem is not fixable in sysvinit or not our responsibility
- A better solution has become available in the interim
- No activity or submitter response in over a decade or more


Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.


--- End Message ---
_______________________________________________
Pkg-sysvinit-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-sysvinit-devel

Reply via email to