From owner-freebsd-bugs Fri Feb 8 1:20:18 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3D57737B426 for ; Fri, 8 Feb 2002 01:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g189K1x71264; Fri, 8 Feb 2002 01:20:01 -0800 (PST) (envelope-from gnats) Received: from dev.icon.bg (dev.icon.bg [62.176.80.181]) by hub.freebsd.org (Postfix) with ESMTP id F236637B41D for ; Fri, 8 Feb 2002 01:13:02 -0800 (PST) Received: (from root@localhost) by dev.icon.bg (8.11.6/8.11.6) id g189DE601729; Fri, 8 Feb 2002 11:13:14 +0200 (EET) (envelope-from root) Message-Id: <200202080913.g189DE601729@dev.icon.bg> Date: Fri, 8 Feb 2002 11:13:14 +0200 (EET) From: Victor Ivanov Reply-To: Victor Ivanov To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: conf/34729: treat smbfs as network file system in /etc/rc Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 34729 >Category: conf >Synopsis: treat smbfs as network file system in /etc/rc >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Feb 08 01:20:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Victor Ivanov >Release: FreeBSD 4.5-STABLE i386 >Organization: ICON Ltd. Bulgaria >Environment: System: FreeBSD dev.icon.bg 4.5-STABLE FreeBSD 4.5-STABLE #7: Mon Feb 4 13:05:20 EET 2002 root@dev.icon.bg:/usr/obj/usr/src/sys/ICON i386 >Description: /etc/rc does not treat SMBFS file systems as network. Adding an entry in /etc/fstab without the 'noauto' option with type 'smbfs' will lead to error -- /etc/rc tries to mount a network file system before initializing the network. SMBFS should be trated as NFS. >How-To-Repeat: Example in /etc/fstab: //v0rbiz@icon/v0rbiz /mnt/icon/v0rbiz smbfs rw 0 0 >Fix: Here's a patch which duplicates the stuff done for NFS in /etc/rc: --- src/etc/rc.orig Fri Feb 8 11:00:01 2002 +++ src/etc/rc Fri Feb 8 11:06:40 2002 @@ -200,8 +200,8 @@ if [ -n "${diskless_mount}" -a -r "${diskless_mount}" ]; then sh ${diskless_mount} else -# otherwise mount everything except nfs filesystems. - mount -a -t nonfs +# otherwise mount everything except nfs and smbfs filesystems. + mount -a -t nonfs,smbfs fi case $? in @@ -311,6 +311,15 @@ *mount_nfs*) echo -n 'Mounting NFS file systems:' mount -a -t nfs + echo '.' + ;; +esac + +# Mount SMBFS filesystems if present in /etc/fstab +case "`mount -d -a -t smbfs 2> /dev/null`" in +*mount_smbfs*) + echo -n 'Mounting SMBFS file systems:' + mount -a -t smbfs echo '.' ;; esac >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message