Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Sep 2010 17:54:52 +0200
From:      Zahemszky =?ISO-8859-2?Q?G=E1bor?= <Gabor@Zahemszky.HU>
To:        freebsd-fs@freebsd.org
Subject:   problem with amd automounter
Message-ID:  <20100912175452.1c488655@Picasso.Zahemszky.HU>

next in thread | raw e-mail | index | archive | help
Hi!

I have a small NAS-box with tho Samba shares. I try to automount the two
SMB-shares with amd and mount_smbfs. Here is my config:

===
$ smbclient -N -L XXX
Anonymous login successful
Domain=[MyNetWork] OS=[Unix] Server=[Samba 3.0.11]

	Sharename       Type      Comment
	---------       ----      -------
	HDD_2_1_1       Disk      For everyone
	ADMIN 1         Disk      
	DISK 1          Disk      For everyone
	IPC$            IPC       IPC Service (ABC)
	ADMIN$          IPC       IPC Service (ABC)
Anonymous login successful
Domain=[MyNetWork] OS=[Unix] Server=[Samba 3.0.11]

	Server               Comment
	---------            -------
	XXX                  ABC

	Workgroup            Master
	---------            -------
	MyNetWork            XXX



$ cat /etc/amd.net
/defaults	\
	rhost:=XXX;\
	fs:=${autodir}/${rhost}/${key};

disk1	\
 	type:=program;\
 	rfs:="DISK 1";\
 	mount:="/sbin/mount mount -t smbfs -o-N
'\\\/\\\/guest@${rhost}/${rfs}' ${fs}";\
	umount:="/sbin/umount umount ${fs}"

disk2	\
	type:=program;\
	rfs:=HDD_2_1_1;\
	mount:="/sbin/mount mount -r -t smbfs -o-N
\\\/\\\/guest@${rhost}/${rfs} ${fs}";\
	umount:="/sbin/umount umount ${fs}"
===

As you can see, the first share's name has a space in its name. I found
nothing about it in FreeBSD's documentation, but from the web, I've
found that I should use single quotes around the mount command's 
argument if it contains space character. I tried it with and without
quotes, but it doesn't matter. I can reach the disk2 share, but I
cannot reach disk1, I get error:

$ amq
/     root    "root"        
/net  toplvl  /etc/amd.net  /net
$ ls /net
$ ls /net/disk2
bla	foo	bar	baz
$ ls /net/disk1
ls: /net/disk1: Unknown error: 2147483647
$ 

Some other info: FreeBSD 8.1-RELEASE amd64, GENERIC kernel

Can anybody help me to write a correct amd config section for it? (No,
I don't like to reconfigure Samba on the other end, I'd like to
understand AMD.)

Thanks,

Zahy < Gabor at Zahemszky dot HU >

PS: Why the old AMD reference manual amdref.* is missing from a full
FreeBSD system? I had to download it from freebsd.org website.

-- 
#!/bin/ksh
#
# See my GPG key at http://www.Zahemszky.HU
#
Z='21N16I25C25E30, 40M30E33E25T15U!';
IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ ';
set -- $Z;for i;{ [[ $i = ? ]]&&print $i&&break;
[[ $i = ??? ]]&&j=$i&&i=${i%?};
typeset -i40 i=8#$i;print -n ${i#???};
[[ "$j" = ??? ]]&&print -n "${j#??} "&&j=;typeset +i i;};
IFS=' 0123456789 ';set -- $Z;for i;{ [[ $i = , ]]&&i=2;
[[ $i = ?? ]]||typeset -l i;j="$j $i";typeset +l i;};print "$j"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100912175452.1c488655>