Galera,

alguém tem uma idéia de como mapear/mountar automaticamente um memory
key, assim como desmontar?

A minha estação pessoal está com sarge instalado, e com o kernel 2.6.8.
Tenho também o udev e o hald instalado. Quando espeto o memory key,
aparecem as seguintes mensagens no /var/log/syslog:
-----------------------
        May  8 22:31:34 localhost kernel: Initializing USB Mass Storage 
driver...
        May  8 22:31:34 localhost kernel: scsi0 : SCSI emulation for USB Mass 
Storage devices
        May  8 22:31:34 localhost kernel:   Vendor: SanDisk   Model: Cruzer 
Mini       Rev: 0.1
        May  8 22:31:34 localhost kernel:   Type:   Direct-Access               
       ANSI SCSI revision: 02
        May  8 22:31:34 localhost kernel: SCSI device sda: 250879 512-byte hdwr 
sectors (128 MB)
        May  8 22:31:34 localhost kernel: sda: assuming Write Enabled
        May  8 22:31:34 localhost kernel: sda: assuming drive cache: write 
through
        May  8 22:31:34 localhost kernel:  /dev/scsi/host0/bus0/target0/lun0: p1
        May  8 22:31:34 localhost kernel: Attached scsi removable disk sda at 
scsi0, channel 0, id 0, lun 0
        May  8 22:31:34 localhost usb.agent[20640]:      usb-storage: loaded 
successfully
        May  8 22:31:34 localhost kernel: USB Mass Storage device found at 3
        May  8 22:31:34 localhost kernel: usbcore: registered new driver 
usb-storage
        May  8 22:31:34 localhost kernel: USB Mass Storage support registered.
        May  8 22:31:34 localhost scsi.agent[20863]:      sd_mod: loaded 
sucessfully (for disk)
        May  8 22:31:35 localhost udev[20835]: configured rule in 
'/etc/udev/rules.d/z_hal-plugdev.rules[2]' applied, 'sda' becomes '%k'
        May  8 22:31:35 localhost udev[20835]: creating device node '/dev/sda'
        May  8 22:31:35 localhost udev[20883]: configured rule in 
'/etc/udev/rules.d/z_hal-plugdev.rules[2]' applied, 'sda1' becomes '%k'
        May  8 22:31:35 localhost udev[20883]: creating device node '/dev/sda1'
-----------------------

Executando lsusb -v 1:3, tenho:
-----------------------
        Bus 001 Device 003: ID 0781:5150 SanDisk Corp. SDCZ2 Cruzer Mini Flash 
Drive (thin)
        Device Descriptor:
        ...
          idVendor           0x0781 SanDisk Corp.
          idProduct          0x5150 SDCZ2 Cruzer Mini Flash Drive (thin)
          bcdDevice            0.10
          iManufacturer           1 SanDisk Corporation
          iProduct                2 Cruzer Mini
          iSerial                 3 SNDK4D3D7422E4701402
        ...
-----------------------

Será que tem algum jeito de reconhecer automaticamente o device
recém-plugado (talvez pelo idProduct e pelo iSerial) e montá-lo em algum
lugar (por exemplo, /media/memkeyN)? 

Fuçando o syslog, o arquivo de configuração
'/etc/udev/rules.d/z_hal-plugdev.rules' me chamou a atenção, mas ele tem
só seguinte conteúdo:
-----------------------
# put removable IDE/SCSI devices into the hal group instead of 'disk'
BUS="scsi",KERNEL="sd[a-z]*", PROGRAM="/etc/udev/scripts/device-removable.sh 
%k", RESULT="1", NAME="%k", MODE="0640", GROUP="hal"
# BUS="ide", KERNEL="hd[a-z]*", PROGRAM="/etc/udev/scripts/device-removable.sh 
%k", RESULT="1", NAME="%k", MODE="0640", GROUP="hal"
BUS="usb", KERNEL="ub[a-z]*", NAME="%k", MODE="0640", GROUP="hal"
-----------------------

-- 
Feng <redbrick1 at terra dot com dot br>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Responder a