Pierre Jarillon wrote: > Le Jeudi 29 Mai 2003 05:02, Olivier Thauvin a �crit :
> > > As the number of removable mass storages should increase, > > > it would be useful to assign a USB peripheral to a device. > > > > Isn't done by dynamic package ? > Yes, with one peripheral at the same time, that work well. > As USB peripherals can be identified, it would be possible to remember > the device which was assigned to each of them. In my previous exemple, > if the usb memory key was assigned to /dev/sdb, it will be always true, > even /dev/hda is not plugged in and computer rebooted. > A consequence is that a dialog is necessary if the device is new : > - name of the device : nikon, bluekey, flashreader, fookey... > - new mount point or use of an old mount point > - remove an old mount point > - temporary device : don't remember after unplug. > > An interest is to have a specific line in fstab for each device with > specific rights. I have been wanting this for a while now and it's in the wiki: http://qa.mandrakesoft.com/twiki/bin/view/Main/DrakxTools#usb_firewire_setup and I have also filed a bug about the creation/removal of /dev entries: https://qa.mandrakesoft.com/show_bug.cgi?id=1191 I believe that one way to achieve what you ask for is to use devlabel. However, it relies on devfs not running [i.e. /proc/partitions contains /dev/sda1, ...] so it would need more development. What devlabel does is it looks at the device that just got connected, say /dev/sda1, and checks its SCSI ID and its partition ID. Then it performs a lookup in its configuration file, which basically consists of: <ID> <location of symlink> <permissions> <other stuff> If it finds a matching drive ID in its configuration file, it would link <location of symlink> to /dev/sda1 and use the permissions given in the config file. If it finds <location of symlink> in /etc/fstab and <other stuff> allows, it would mount <location of symlink>. Pretty neat stuff if you ask me. Narfi.
