Date: Tue, 16 Jan 2007 18:27:03 -0500 From: Nick Gustas <freebsd-stable@tychl.net> To: "Marat N.Afanasyev" <amarat@ksu.ru> Cc: freebsd-stable@freebsd.org Subject: Re: charset conversion support in amd(8) Message-ID: <45AD5F47.3080702@tychl.net> In-Reply-To: <45AD5A67.3030303@ksu.ru> References: <45ABB899.7060807@ksu.ru> <45ABC595.4090206@gustas.org> <45AD5A67.3030303@ksu.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45AD5F47.3080702>