I received the following mail from Andrew Tridgell, which should make
smbfs work with the automounter. I do not use amd, so I can not test
it.

I already applied Andrew's patch to smbmount.c, so you can use
smbmount with one or with two slashes before the server.


Date: Mon, 5 Jun 1995 11:45:38 +1000
From: "Andrew.Tridgell" <tridge@arvidsjaur.anu.edu.au>
To: samba@anugpo.anu.edu.au
Cc: eyal@fir.canberra.edu.au, lendecke@namu01.gwdg.de
Subject: ksmbfs + amd
Reply-To: Andrew.Tridgell@anu.edu.au

At home I use Volker's ksmbfs to mount my wifes WfWg drives on my
linux box. I found that together with the amd automount daemon it made
a very convenient package.

Unfortunately amd collapses // to / in it's map files, so I needed
this small change to smbmount.c for it to work:

diff -u ksmbfs-0.1/smbmount.c ksmbfs-0.1.new/smbmount.c
--- ksmbfs-0.1/smbmount.c       Thu May  4 04:30:17 1995
+++ ksmbfs-0.1.new/smbmount.c   Sun Jun  4 20:03:54 1995
@@ -161,12 +161,11 @@
                 return -1;
         }
 
-        if (!(   (complete_service[0] == '/')
-              && (complete_service[1] == '/'))) {
+        if (!(complete_service[0] == '/')) {
                 return -1;
         }
 
-        complete_service += 2;
+       while (complete_service[0] == '/') complete_service++;
 
         share_start = strchr(complete_service, '/');


In case anyone is interested this is my amd map file for my two ksmbfs
mounts:

laplandc type:=program;mount:="/sbin/smbmount smbmount //lapland/c ${fs} -P XXXX -u 148";unmount:="/sbin/umount umount ${fs}"

laplandd type:=program;mount:="/sbin/smbmount smbmount //lapland/d ${fs} -P XXXX -u 148";unmount:="/sbin/umount umount ${fs}"


It's nice being able to edit my wifes config files using emacs :-)

I tried importing a drive from WfWg then reexporting it back to the
same PC using Samba. Trying to then copy a file using the WfWg file
manager to the net drive caused windows to freeze, which I think
demonstrates that the WfWg networking code is single threaded (it did
not service requests while waiting for a response)

I then tried it with Win95 and it worked, which means Win95 must be
able to respond to SMB requessts while waitng for a response to it's
own requests. It also mean that ksmbfs works pretty well! I was able
to run some large apps though this convoluted setup. ksmbfs did
eventually die, but I was hitting it pretty hard and it is version 0.1 :-)

Andrew



