From owner-freebsd-questions@FreeBSD.ORG Thu Jul 10 21:35:15 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C5D737B407 for ; Thu, 10 Jul 2003 21:35:15 -0700 (PDT) Received: from wolf.bytecraft.au.com (wolf.bytecraft.au.com [203.39.118.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF21743FBD for ; Thu, 10 Jul 2003 21:35:13 -0700 (PDT) (envelope-from murraytaylor@bytecraftsystems.com) Received: from svmarshal.bytecraft.au.com ([10.0.0.4]) by wolf.bytecraft.au.com (8.12.9/8.12.9) with ESMTP id h6B4ZBcC017500; Fri, 11 Jul 2003 14:35:11 +1000 (EST) (envelope-from murraytaylor@bytecraftsystems.com) Received: from wombat.bytecraft.au.com (Not Verified[10.0.0.3]) by svmarshal.bytecraft.au.com with MailMarshal (v5,0,3,78) id ; Fri, 11 Jul 2003 14:37:43 +1000 Received: from [10.0.17.42] (mjtdev1.dand06.au.bytecraft.au.com [10.0.17.42]) by wombat.bytecraft.au.com (Postfix) with ESMTP id B306D3F0F; Fri, 11 Jul 2003 14:35:10 +1000 (EST) From: Murray Taylor To: stan In-Reply-To: <20030711013430.GB764@teddy.fas.com> References: <20030710201148.GB26310@teddy.fas.com> <20030710134409.P17141@jds14.jdshostimg.com> <1057882263.7896.61.camel@mjtdev1.dand06.au.bytecraft.au.com> <20030711013430.GB764@teddy.fas.com> Content-Type: text/plain Organization: Bytecraft Systems Message-Id: <1057898109.14608.0.camel@mjtdev1.dand06.au.bytecraft.au.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Content-Transfer-Encoding: 7bit cc: Free BSD Questions list cc: Murray Taylor Subject: Re: Mounting a Samab share at boot time X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Fri, 11 Jul 2003 04:35:15 -0000 X-Original-Date: 11 Jul 2003 14:35:10 +1000 X-List-Received-Date: Fri, 11 Jul 2003 04:35:15 -0000 correct.. fstab is noauto for the smbfs mounts On Fri, 2003-07-11 at 11:34, stan wrote: > On Fri, Jul 11, 2003 at 12:11:03AM +0000, Murray Taylor wrote: > > I believe that the method mentioned here is the appropriate way. > > > > #!/bin/sh > > # > > # $Id: smbfs.sh.sample,v 1.3 2001/01/13 04:50:36 bp Exp $ > > # > > # Location: /usr/local/etc/rc.d/smbfs.sh > > # > > # Simple script to mount smbfs file systems at startup. > > # It assumes that all mount points described in fstab file and password > > # entries listed in /root/.nsmbrc file. See mount_smbfs(8) for details. > > # > > > > mount="/sbin/mount -o -N" > > umount=/sbin/umount > > HOME=/root; export HOME > > vols=`awk -- '/^\/.*[[:space:]]+smbfs[[:space:]]+/ { print $2 }' > > /etc/fstab` > > > > case "$1" in > > start) > > echo -n "smbfs: " > > for vol in ${vols}; do > > $mount $vol > > echo -n "$vol " > > done > > ;; > > stop) > > echo -n "unmounting smbfs mount points: " > > for vol in ${vols}; do > > $umount $vol > > echo -n "$vol " > > done > > ;; > > *) > > echo "Usage: `basename $0` {start|stop}" >&2 > > exit 64 > > esac > > > > echo "Done" > > > > Would this assume that you had the "noauto" paramter for the smbfs > partitions in /etc/fstab? Else earlier scripts would try to mount them, I > beleive, and fail. > > > > > > > It seems to me that the reason for this is that the ufs kernel > > 'knowledge' allows the fstab mounts for the ufs slices to progress but > > perhaps the smbfs module is not yet loaded, so the smb mounts go > > pearshaped in auto mode. > > I've solved that part of the problem, by hvaing the smbfs module loaded by > using /boot/loader.conf. Howeverm that just gets me to the next problem. > An attempt is made to mount all filesystems not marked as "noauto" _before_ > networking is brought up, Thus my problem > > > > > > > On Thu, 2003-07-10 at 20:44, Rus Foster wrote: > > > Hi, > > > > Here is what I'm trying to do. I want to mount a Samba share from a remote > > > > machine on boot up. Presently I have the appropriate entry in /etc/fsatb, > > > > such that I can mount the share _once I am in multiuser_. I have figured > > > > out how to get the smbfs kernel module loaded at boot time, using > > > > /boot/loader.conf. > > > > > > > > > > A workaround I can think of is set the noauto option in /etc/fstab then in > > > /etc/rc.local put mount /samba/shre > > > > > > HTH > > > > > > RGds > > > > > > Rus Foster > > -- > > Murray Taylor > > Special Projects Engineer > > --------------------------------- > > Bytecraft Systems & Entertainment > > P: +61 3 8710 2555 > > F: +61 3 8710 2599 > > D: +61 3 9238 4275 > > M: +61 417 319 256 > > E: murraytaylor@bytecraftsystems.com > > or visit us on the web > > http://www.bytecraftsystems.com > > http://www.bytecraftentertainment.com > > > > > > > > ************************************************************************ > > This Email has been scanned for Viruses by MailMarshal. > > ************************************************************************ > > -- Murray Taylor Special Projects Engineer --------------------------------- Bytecraft Systems & Entertainment P: +61 3 8710 2555 F: +61 3 8710 2599 D: +61 3 9238 4275 M: +61 417 319 256 E: murraytaylor@bytecraftsystems.com or visit us on the web http://www.bytecraftsystems.com http://www.bytecraftentertainment.com ************************************************************************ This Email has been scanned for Viruses by MailMarshal. ************************************************************************