security/cfs fix

Daniel O'Connor doconnor at
Tue Jan 19 04:53:28 UTC 2010

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/ cfs/files/
--- /usr/ports/security/cfs/files/    2005-06-08 20:41:08.000000000 +0930
+++ cfs/files/        2010-01-19 14:52:43.000000000 +1030
@@ -29,7 +29,7 @@
        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"

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

Daniel O'Connor software and network engineer
for Genesis Software -
"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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: This is a digitally signed message part.
Url :

More information about the freebsd-ports mailing list