lkml.org 
[lkml]   [1998]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: autofs/smbfs - delayed mounting?
Date
Nicholas J. Leon enscribed thusly:
> On Tue, 1 Dec 1998, Michael H. Warfield wrote:

> # Something fishy here... Process 758 has gone zombie... I'm really
> # curious what the parent processes to 769 and 758 were... I'm also curious
> # to see what your automount map looked like.

> Ok, I'll warn 'ya, my setup is bizarre :)

Ok... Now some things are coming clearer...

You're using the mount.fstype hook in mount instead of the built-in
smbfs support. Ok... Noted...

> [/etc/autofs.conf]
> floppy -fstype=auto :/dev/fd0
> boot -fstype=ext2 :/dev/hda1
> zip -fstype=auto :/dev/sda4
> cd -fstype=auto :/dev/hdd
> cdr -fstype=auto :/dev/sr0
> madi -rw,soft,intr,rsize=8192,wsize=8192 madi:/
> pico -rw,soft,intr,rsize=8192,wsize=8192 pico:/
> tao -fstype=smb tao:/c
> nicadaemus -fstype=smb nicadaemus:/c


> # I see that there is no password (it would have appeared as an XXXXX
> # in the ps display). Is there a password on the share? If you run the
> # smbmount program (the binary - not any front end scripts such as mine)
> # manually, do you get prompted for a password?

> No passwords are used. And no, if I run stuff manually, I don't get
> prompted for a password.

> # Since you are using autofs, are you using my shell script
> # <http://www.wittsend.com/mhw/smbmount.html> or another script for

> Another, a very simple one:

> [/sbin/mount.smb]
> #!/bin/sh

> CPATH=$1
> POINT=$2
> OPT=$3

> NEW="\\\\`echo $CPATH | cut -f1 -d:`"
> SHARE=`echo $CPATH | cut -f2 -d/`

> NEWSHARE="$NEW\\$SHARE"

> #echo smbmount $NEWSHARE -c "mount $POINT -u 0 -g 0"
> smbmount $NEWSHARE -c "mount $POINT -u 0 -g 0" &
> sleep 10
> killall -HUP smbmount

> ---

> I put the 'sleep && killall' because it ``fixed'' my problem (sending any
> signal to smbmount makes it exit and continue normally).

> This is hackish, very much so. But I was just testing for right now.

The fix will kill off your reconnect daemon and commit other random
acts of terrorism. That is a very bad idea. What if there was another
mount in progress at that moment? Mounts with smbmount can take significant
amounts of time for authentication handshaking...

> # I also see that the -N option (no password) is NOT present. That
> # makes me even more suspicious that smbmount is attempting to prompt for
> # a password and you are hung there waiting...

> I don't think so. If I run

> /sbin/mount.smb tao:/c /mnt1

> it works just fine. But anyhook, I just changed my script to use -N on
> smbmount and it didn't make any difference.

Hmmm... Then I strongly suspect that you are running into the
same problem I saw when I got my smbmount script going. It works fine
with no hanging when done manually or when stdout and stderr are redirected
to files. When left alone, and automount attempts to redirect the output
to syslog, smbmount hangs exactly as you have described.

Try this...

Take out the ugly sleep...killall hack and use this smbmount
command in the script instead:

smbmount $NEWSHARE -c "mount $POINT -u 0 -g 0" > /tmp/smbmount.$$.out 2> /tmp/smbmount.$$.err

If this works, you are running into the syslog problem that I'm
trying to track down...

WARNING!!! That command is for TESTING only and contains security
risks! Don't use it if anyone on your system can play silly buggers with
symlinks!

> G'day!
>
> -- n i c h o l a s j l e o n
> / elegance through simplicity /
> / good fortune through truth / http://mrnick.binary9.net
> / not all questions have answers / mailto:nicholas@binary9.net

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.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.037 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site