charset conversion support in amd(8)

Marat N.Afanasyev amarat at ksu.ru
Tue Jan 16 23:06:29 UTC 2007


Nick Gustas wrote:
> 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.
> 
> 
> 
> 
> 
> 
> 
> 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?
>>
> 
> 

thanks, I made my config similar to yours and it works ;)

-- 
SY, Marat


More information about the freebsd-stable mailing list