From owner-freebsd-bugs@FreeBSD.ORG Wed Jun 4 19:40:17 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10A6A37B401 for ; Wed, 4 Jun 2003 19:40:17 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9DDD43FBD for ; Wed, 4 Jun 2003 19:40:15 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h552eFUp071196 for ; Wed, 4 Jun 2003 19:40:15 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h552eFVx071195; Wed, 4 Jun 2003 19:40:15 -0700 (PDT) Resent-Date: Wed, 4 Jun 2003 19:40:15 -0700 (PDT) Resent-Message-Id: <200306050240.h552eFVx071195@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, The Anarcat Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23ECE37B404 for ; Wed, 4 Jun 2003 19:39:13 -0700 (PDT) Received: from aeimail.aei.ca (aeimail.aei.ca [206.123.6.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24D0C43FBD for ; Wed, 4 Jun 2003 19:39:12 -0700 (PDT) (envelope-from anarcat@anarcat.ath.cx) Received: from shall.anarcat.ath.cx (oczvd3jc1kxjh2e3@dsl-133-253.aei.ca [66.36.133.253]) by aeimail.aei.ca (8.11.6/8.10.1) with ESMTP id h552d8g08509 for ; Wed, 4 Jun 2003 22:39:09 -0400 (EDT) Received: from lenny.anarcat.ath.cx (lenny.anarcat.ath.cx [192.168.0.4]) by shall.anarcat.ath.cx (Postfix) with SMTP id 0EC2C3C2; Wed, 4 Jun 2003 22:38:59 -0400 (EDT) Received: by lenny.anarcat.ath.cx (sSMTP sendmail emulation); Wed, 4 Jun 2003 22:39:01 -0400 Message-Id: <20030605023859.0EC2C3C2@shall.anarcat.ath.cx> Date: Wed, 4 Jun 2003 22:39:01 -0400 From: The Anarcat To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: conf/52959: rcNG ignores non-nfs network mounts X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: The Anarcat List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2003 02:40:17 -0000 >Number: 52959 >Category: conf >Synopsis: rcNG ignores non-nfs network mounts >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 04 19:40:15 PDT 2003 >Closed-Date: >Last-Modified: >Originator: The Anarcat >Release: FreeBSD 5.1-RELEASE i386 >Organization: >Environment: System: FreeBSD lenny.anarcat.ath.cx 5.1-RELEASE FreeBSD 5.1-RELEASE #4: Wed Jun 4 10:34:08 EDT 2003 anarcat@lenny.anarcat.ath.cx:/usr/obj/usr/src/sys/LENNII i386 >Description: For some time now, the samba shares are mounted by default, or at least possible to mount automatically using the extra_netfs_types toggle in rc.conf. Under rcNG, this doesn't work anymore. A samba share specified in /etc/fstab isn't mounted along with the NFS fs, even if an extra_netfs_types line is in /etc/rc.conf. I feel I'm too late for 5.1 now, since the tag seems to have been layed down, and that's why I'm logging this to GNATS. :) >How-To-Repeat: In /etc/fstab: //myshares/share /mnt smbfs ro,-N,noexec 0 0 With or without: extra_netfs_types="smbfs:SMB" doesn't mount the share at boot. >Fix: Hack: --- mountcritremote.orig Wed Jun 4 18:48:31 2003 +++ mountcritremote Wed Jun 4 22:22:06 2003 @@ -55,6 +55,17 @@ mount -a -t nfs echo '.' + # Set up the list of network filesystem types for which mounting + # should be delayed until after network initialization. + networkfs_types='nfs:NFS smbfs:SMB portalfs:PORTAL' + case ${extra_netfs_types} in + [Nn][Oo]) + ;; + *) + networkfs_types="${networkfs_types} ${extra_netfs_types}" + ;; + esac + # Mount other network filesystems if present in /etc/fstab. for i in ${networkfs_types}; do fstype=${i%:*} Those inserted lines should be put in some common file in the rcNG framework, but I don't know it enough to choose. An alternative, maybe cleaner solution could be: --- etc/rc.d/mountcritlocal.orig Wed Jun 4 22:29:33 2003 +++ etc/rc.d/mountcritlocal Wed Jun 4 22:28:53 2003 @@ -18,20 +18,9 @@ { case ${OSTYPE} in FreeBSD) - # Set up the list of network filesystem types for which mounting - # should be delayed until after network initialization. - networkfs_types='nfs:NFS smbfs:SMB portalfs:PORTAL' - case ${extra_netfs_types} in - [Nn][Oo]) - ;; - *) - networkfs_types="${networkfs_types} ${extra_netfs_types}" - ;; - esac - # Mount everything except nfs filesystems. mount_excludes='no' - for i in ${networkfs_types}; do + for i in ${networkfs_types} ${extra_netfs_types}; do fstype=${i%:*} mount_excludes="${mount_excludes}${fstype}," done --- etc/rc.d/mountcritremote.orig Wed Jun 4 22:27:34 2003 +++ etc/rc.d/mountcritremote Wed Jun 4 22:27:01 2003 @@ -56,7 +56,7 @@ echo '.' # Mount other network filesystems if present in /etc/fstab. - for i in ${networkfs_types}; do + for i in ${networkfs_types} ${extra_netfs_types}; do fstype=${i%:*} fsdecr=${i#*:} --- /usr/src/etc/defaults/rc.conf Fri May 2 01:27:34 2003 +++ etc/defaults/rc.conf Wed Jun 4 22:34:40 2003 @@ -44,8 +44,10 @@ fsck_y_enable="NO" # Set to YES to do fsck -y if the initial preen fails. background_fsck="YES" # Attempt to run fsck in the background where possible. background_fsck_delay="60" # Time to wait (seconds) before starting the fsck. -extra_netfs_types="NO" # List of network extra filesystem types for delayed - # mount at startup (or NO). +networkfs_types='nfs:NFS smbfs:SMB portalfs:PORTAL' # network filesystems + # NOTE: mount delayed after network initialization +extra_netfs_types="" # List of network extra filesystem types for delayed + # mount at startup (or ""). ############################################################## ### Network configuration sub-section ###################### But I feel this last one is going to create an uproar of bikeshed wars for the untraditionnal use of a rc.conf toggle ("" instead of NO). Also, it's pretty pointless to have extra_netfs_types if you can hack networkfs_types... :) The problem here is that I don't want to duplicate code between mountcritremote and mountcritlocal, any ideas? >Release-Note: >Audit-Trail: >Unformatted: