View previous topic :: View next topic |
Author |
Message |
larand54 l33t
Joined: 20 Feb 2004 Posts: 695 Location: Sweden
|
Posted: Fri Aug 27, 2004 8:26 pm Post subject: hotplugging-usb-storage |
|
|
I've just bought a camera KONICA MINOLTA DiMAGE Z3, a beutiful thing , connect's just fine as a device sda1. You can mount it and copy files. Everything is working well...nearly.
I read that you can make this all working automatically - Just connect the camera, power it on and - voila! It's mounted on /mnt/minolta!
I tried to follow the instructions but failed to make it work.
The instructions told me to add data to /etc/hotplug/usb.usermap which describe vendor and product (0x132b and 0x0017) and connecting it to a file (DiMAGE-Z3) which will be in /etc/hotplug/usb
This file is a batchfile which is (probably) called from usb.agent with vendor and model data. This file then mounts the camera.
In my case nothing happends. I'll get nothing bad on the logs.
I'm using kernel 2.6.7 for the moment.
Thank you for reading this and hopefully giving some solution(s). |
|
Back to top |
|
|
keyson l33t
Joined: 10 Jun 2003 Posts: 830 Location: Sweden
|
Posted: Sat Aug 28, 2004 7:26 pm Post subject: |
|
|
Hi
Hard to say what's wrong as you dont show the setup.
But there are some small tings that may go wrong.
You have to make a file
/etc/hotplug/usb/usbdrive.usermap (you may name it cam.usermap)
This is for my usb-stick
Quote: | # usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
usb-stick 0x0003 0x0d7d 0x0100 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
|
I set match_flag to 0x0003 to only check vend/prod id.
Then the usb-stick script that is called from the usbdrive.usermap
Quote: | #!/bin/sh
# fil: /etc/hotplug/usb/usb-stick
case "$PRODUCT" in
d7d/100/100) # 64M usb minne
ln -s /var/autofs/removable/stick /mnt/stick
# körbar kommando fil när urkoppling sker
echo -e '#!/bin/sh\nrm /mnt/stick' > $REMOVER
chmod a+x $REMOVER
;;
esac |
One thing in this file is that the revision for my stick is 1.00 so
it's 100. If the revision would be 0.02 it should read
d7d/100/2 .This is one thing that is making trouble.
I use autofs so instead of the "ln -s..." you can use /bin/mount /mnt/minolta. If you have it setup in the fstab.
Any help ?
BTW. Found this
https://forums.gentoo.org/viewtopic.php?t=15334&postdays=0&postorder=asc&start=25 |
|
Back to top |
|
|
|