From owner-freebsd-stable@FreeBSD.ORG Tue Jan 16 23:40:51 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A39AF16A4AB for ; Tue, 16 Jan 2007 23:40:51 +0000 (UTC) (envelope-from freebsd-stable@tychl.net) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [63.240.77.83]) by mx1.freebsd.org (Postfix) with ESMTP id 694D713C4C2 for ; Tue, 16 Jan 2007 23:40:51 +0000 (UTC) (envelope-from freebsd-stable@tychl.net) Received: from masq.tychl.net (tychl.no-ip.org[67.174.137.176]) by comcast.net (sccrmhc13) with ESMTP id <2007011623270201300luqkke>; Tue, 16 Jan 2007 23:27:13 +0000 Received: from localhost (localhost [127.0.0.1]) by masq.tychl.net (Postfix) with ESMTP id 57ED61CB6B; Tue, 16 Jan 2007 18:27:02 -0500 (EST) X-Virus-Scanned: amavisd-new at tychl.net Received: from masq.tychl.net ([127.0.0.1]) by localhost (masq.tychl.net [127.0.0.1]) (amavisd-new, port 10024) with SMTP id yzExEXZa6FPR; Tue, 16 Jan 2007 18:26:58 -0500 (EST) Received: from [127.0.0.1] (unknown [192.168.0.51]) by masq.tychl.net (Postfix) with ESMTP id 280D71CB30; Tue, 16 Jan 2007 18:26:58 -0500 (EST) Message-ID: <45AD5F47.3080702@tychl.net> Date: Tue, 16 Jan 2007 18:27:03 -0500 From: Nick Gustas User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: "Marat N.Afanasyev" References: <45ABB899.7060807@ksu.ru> <45ABC595.4090206@gustas.org> <45AD5A67.3030303@ksu.ru> In-Reply-To: <45AD5A67.3030303@ksu.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: charset conversion support in amd(8) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2007 23:40:51 -0000 Marat N.Afanasyev wrote: > Nick Gustas wrote: >> Marat N.Afanasyev wrote: >>> Hello! >>> >>> I found that automount daemon configured to use cdrom device doesn't >>> support -C option to convert filenames to local charset. Is there >>> any ways to make it work? >>> >>> my amd.map is as follows: >>> >>> # $FreeBSD: src/etc/amd.map,v 1.9 2002/05/15 22:24:29 obrien Exp $ >>> # >>> /defaults type:=host;fs:=${autodir}/${rhost}/host;rhost:=${key} >>> * opts:=rw,grpid,resvport,vers=3,proto=udp,nosuid,nodev >>> >>> cdrom fs:=${autodir}/cdrom;type:=cdfs;opts:=ro;dev:=/dev/cd2 >>> >>> adding Ckoi8-r to opts doesn't solve the problem. I suppose one >>> should add charset conversion ability to amd itself. Am I right? >>> >> I have an old amd.map from 1999 or so that we use for a freebsd cd >> server here at work, it uses a mount "type" of program. I don't see >> this format documented in the current amd man pages, but it still >> works on 6-stable. >> >> You should be able to change the mount commands to mount_cd9660 and >> add the -C option. >> amd.map: >> ____________ >> cdrom0 type:=program;\ >> fs:=/realmounts/cdrom0;\ >> mount:="/sbin/mount mount /realmounts/cdrom0";\ >> unmount:="/sbin/umount umount /realmounts/cdrom0" >> cdrom1 type:=program;\ >> fs:=/realmounts/cdrom1;\ >> mount:="/sbin/mount mount /realmounts/cdrom1";\ >> unmount:="/sbin/umount umount /realmounts/cdrom1" >> cdrom2 type:=program;\ >> fs:=/realmounts/cdrom2;\ >> mount:="/sbin/mount mount /realmounts/cdrom2";\ >> unmount:="/sbin/umount umount /realmounts/cdrom2" >> cdrom3 type:=program;\ >> fs:=/realmounts/cdrom3;\ >> mount:="/sbin/mount mount /realmounts/cdrom3";\ >> unmount:="/sbin/umount umount /realmounts/cdrom3" >> cdrom4 type:=program;\ >> fs:=/realmounts/cdrom4;\ >> mount:="/sbin/mount mount /realmounts/cdrom4";\ >> unmount:="/sbin/umount umount /realmounts/cdrom4" >> cdrom5 type:=program;\ >> fs:=/realmounts/cdrom5;\ >> mount:="/sbin/mount mount /realmounts/cdrom5";\ >> unmount:="/sbin/umount umount /realmounts/cdrom5" >> cdrom6 type:=program;\ >> fs:=/realmounts/cdrom6;\ >> mount:="/sbin/mount mount /realmounts/cdrom6";\ >> unmount:="/sbin/umount umount /realmounts/cdrom6" >> ____________ >> >> >> fstab: >> ____________ >> /dev/cd0 /realmounts/cdrom0 cd9660 >> ro,noauto 0 0 >> /dev/cd1 /realmounts/cdrom1 cd9660 >> ro,noauto 0 0 >> /dev/cd2 /realmounts/cdrom2 cd9660 >> ro,noauto 0 0 >> /dev/cd3 /realmounts/cdrom3 cd9660 >> ro,noauto 0 0 >> /dev/cd4 /realmounts/cdrom4 cd9660 >> ro,noauto 0 0 >> /dev/cd5 /realmounts/cdrom5 cd9660 >> ro,noauto 0 0 >> /dev/cd6 /realmounts/cdrom6 cd9660 >> ro,noauto 0 0 >> ____________ >> >> >> amd command line: >> ____________ >> /usr/sbin/amd -p -a /cdrom -w 5 -c 10 /cdrom /etc/amd.map /cdrom >> /etc/amd.map >> ____________ >> >> >> directories to create: >> ____________ >> mkdir -p /realmounts/cdrom0 >> mkdir -p /realmounts/cdrom1 >> mkdir -p /realmounts/cdrom2 >> mkdir -p /realmounts/cdrom3 >> mkdir -p /realmounts/cdrom4 >> mkdir -p /realmounts/cdrom5 >> mkdir -p /realmounts/cdrom6 >> mkdir /cdrom >> >> >> It certainly looks hacky compared to your config, but it's worked >> from freebsd 3.1 through now so I never changed it. >> >> > > thanks, I made my config similar to yours and it works ;) > Glad it works for you! I was rather surprised at the lack of info in the man pages about this setup.. I even rechecked the FreeBSD 3.3 amd/amd.conf man pages just now and they didn't list this option either, maybe I'm missing it. Not sure where I found the original config, must have been online at some point. I suppose this quote from the amd(8) man page applies: "A weird imagination is most useful to gain full advantage of all the features." -Nick (inadvertent top posting fixed)