Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jun 2003 18:57:09 -0400
From:      The Anarcat <anarcat@anarcat.ath.cx>
To:        current@freebsd.org
Cc:        re@freebsd.org
Subject:   SMBFS automounting broken?
Message-ID:  <20030604225709.GA808@lenny.anarcat.ath.cx>

next in thread | raw e-mail | index | archive | help
Hi!

Recently, I noticed that my samba shares were not automounted on
boot.

What I understand of it is that netfs_types is defined in
rc.d/mountcritlocal, but not in rc.d/mountcritremote, which makes the
code:

                # Mount other network filesystems if present in /etc/fstab.
                for i in ${networkfs_types}; do
                        fstype=3D${i%:*}
                        fsdecr=3D${i#*:}

                        [ "${fstype}" =3D "nfs" ] && continue

                        case "`mount -d -a -t ${fstype}`" in
                        *mount_${fstype}*)
                                echo -n "Mounting ${fsdecr} file systems:"
                                mount -a -t ${fstype}
                                echo '.'
                                ;;
                        esac
                done

does strictly nothin, since networkfs_types is empty.

A workaround would be the following patch, but I'm sure there's a
better way to do this, maybe by putting the networkfs_types in
defaults/rc.conf?

--- mountcritremote.orig	Wed Jun  4 18:48:31 2003
+++ mountcritremote	Wed Jun  4 18:55:55 2003
@@ -55,6 +55,9 @@
 		mount -a -t nfs
 		echo '.'
=20
+                # Set up the list of network filesystem types for which mo=
unting
+                # should be delayed until after network initialization.
+                networkfs_types=3D'nfs:NFS smbfs:SMB portalfs:PORTAL'
 		# Mount other network filesystems if present in /etc/fstab.
 		for i in ${networkfs_types}; do
 			fstype=3D${i%:*}

The patch to rc.conf would be very similar, of course.

I think this should be rushed in 5.1 so I CC: the REs.

A.

--=20
Seul a un caract=E8re scientifique ce qui peut =EAtre r=E9fut=E9. Ce qui n'=
est
pas r=E9futable rel=E8ve de la magie ou de la mystique.
                        - Popper, Karl



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030604225709.GA808>