Re: SMBFS: Question...

Michael H. Warfield (mhw@alcove.wittsend.com)
Tue, 4 Aug 1998 21:22:48 -0400 (EDT)


Brion Vibber enscribed thusly:
> Michael H. Warfield wrote:

> > A way to hook this out of the "mount" command would definitly be
> > sweet, let's just not loose sight of the compatibility issues this time.

> I'm surprised no one else has done this yet... Here's a perl script that
> will call either regular mount or (classic) smbmount (or new with the
> wrapper). It seems to work for me, but I provide no warranty for it
> working for anyone else in any circumstances! Feel free to tune to your
> preferences.

> Note that this will almost certainly _not_ work for smbfs partitions
> listed in /etc/fstab, you'll need to specify at least service name
> (//server/service) and mount point on the command line.

Hmmm... Maybe you've missed some of the discussions involved here,
but it is a little more involved than just a frontend script to mount.
My main concern is getting autofs/automount to work and that's going
to require some additional parameter passing and parsing. Yes, I
think that hooking this out of mount would be sweet and I stand by
that statement. But that, you see, is actually the easy part. It's
getting the other stuff, such as /etc/fstab and autofs / automount or
amd to cooperate with all of the changes. Plus this needs to be done
in a way that let's you use either version of smbfs (the one in the 2.0
kernels and the one in the 2.1 kernels). Now, your script could very
well work with my version checking smbmount script so that you're mount
script hands off to my smbmount script which, in turn calls the appropriate
smbmount (smbfs or samba) according to which version we are running. But
that's getting more than a little complicated especially when you factor
in the parameter passing, parsing, and translating. What I'm after is
some sort of uniform, unified approach.

Then again... Maybe this chain of scripts is the best we can
hope for.

One serious gotcha with the perl script idea though... You need
mount to be available and functional during bootup where /usr may not
even be mounted yet. All of my systems have /usr and /var on separate
partitions. A perl script will not work under those circumstances and
would break as soon as you tried to boot up. Now if you used the
binary mount to get into multi-user mode and then the perl script to
operate and decide after that... The problem here is that you would
have to modify any and all rc scripts which call "mount" to call
"mount.real" instead of your mount, or you may end up with systems
which are totally unbootable (mine would be). A "bash" or "sh" script
would not suffer from this limitation though, since "sh" is required
for the rc scripts in the first place.

For those late to the discussion who missed the earlier messages,
I have an smbmount replacement available that checks the kernel version
and calls either smbmount.smbfs or smbmount.samba as appropriate for the
kernel version and with appropriate parameter tranlations for the samba
version of smbmount to get everything working with autofs / automount.
It's a relatively simple bash/sh script...

http://www.wittsend.com/mhw/smbmount.html

> Enjoy!

Appreciated!

> -- brion vibber (brion@pobox.com)

Regards,
Mike

-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw@WittsEnd.com
  (The Mad Wizard)      |  (770) 925-8248   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html