From owner-freebsd-fs@FreeBSD.ORG Sun Sep 12 16:20:31 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3686C1065696 for ; Sun, 12 Sep 2010 16:20:31 +0000 (UTC) (envelope-from Gabor@Zahemszky.HU) Received: from relay03.digicable.hu (relay03.digicable.hu [92.249.128.185]) by mx1.freebsd.org (Postfix) with ESMTP id EEDA28FC1E for ; Sun, 12 Sep 2010 16:20:30 +0000 (UTC) Received: from [94.21.9.100] (helo=Picasso.Zahemszky.HU) by relay03.digicable.hu with esmtpa id 1OuotI-000469-Ds for ; Sun, 12 Sep 2010 17:54:52 +0200 Date: Sun, 12 Sep 2010 17:54:52 +0200 From: Zahemszky =?ISO-8859-2?Q?G=E1bor?= To: freebsd-fs@freebsd.org Message-ID: <20100912175452.1c488655@Picasso.Zahemszky.HU> Organization: Zahemszky Bt. X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Original: 94.21.9.100 Subject: problem with amd automounter X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 16:20:31 -0000 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"