From: "Daniel O'Connor" on
Hi,
This is a quick patch to cfs which stops it stalling (forever) the
system startup if mountd fails. This can happen if mountd picks a port
which is already used (no idea why it doesn't try a few times) and then
cfsd fails.. If cfsd is not running mount will try forever (by default)
to connect.

The second part makes sure that cfsd is killed on stop even if the
umount failed for some reason.

diff -ur /usr/ports/security/cfs/files/cfsd.sh.in cfs/files/cfsd.sh.in
--- /usr/ports/security/cfs/files/cfsd.sh.in 2005-06-08 20:41:08.000000000 +0930
+++ cfs/files/cfsd.sh.in 2010-01-19 14:52:43.000000000 +1030
@@ -29,7 +29,7 @@
cfsd_poststart()
{
if [ -n "$cfsd_mountpoint" ]; then
- mount -o port="$cfsd_port",nfsv2 localhost:%%CFSD_BOOTSTRAP%% "$cfsd_mountpoint"
+ mount_nfs -R 1 -o port="$cfsd_port",nfsv2 localhost:%%CFSD_BOOTSTRAP%% "$cfsd_mountpoint"
fi
}

@@ -37,6 +37,7 @@
{
if [ -n "$cfsd_mountpoint" ]; then
umount "$cfsd_mountpoint"
+ echo >/dev/null
fi
}


--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C