hotplug usb-storage experience
Alexandre Strube
surak at surak.eti.br
Sun Jan 18 01:02:44 UTC 2004
Em Sáb, 2004-01-17 às 19:12, Jason Cortezzo escreveu:
(bottom post) - THANK YOU!!! (My mother thanks even more than me)
> I just spent several hours trying to get hotplug to mount/umount my
> usb-storage camera when it is plugged/unplugged from the system.
(...)
> inconvenient. So, feeling like I was on a roll, I kept digging. It
> turns outs that hotplug sets a variable called $REMOVER which you can
Just for curiosity, where the heck did you find all this? I'm so happy
now :-)
> access in the hotplug script ( /etc/hotplug/usb/usb-storage) which is
> the path of the script that will be executed when the device is
> unplugged. The value of $REMOVER always ended up being
> /var/run/usb/{cryptic_string}. So, I modified my script to actually
> write a removal script to that path which would umount the camera. In
> the end the script at /etc/hotplug/usb/usb-storage looked like this...
> #!/bin/bash
> mount /mnt/camera
> echo '#!/bin/bash' > "$REMOVER"
> echo 'umount /mnt/camera' >> "$REMOVER"
> chmod u+x $REMOVER
Perfect! This SHOULD be on FC2 - Would make every camera owner's life
easier, specially for those people coming from windoze world.
> In the end, it works perfectly. I plug in the camera and it gets
> mounted and a little icon shows up on my desktop. When I unplug it, it
> gets umounted and the icon disappears - very nice.
It does not work THAT perfectly though (just discovered while writing
this) - as camera is mounted as root, I cannot delete directly from
nautilus (or even use camera as a memory stick, which sometimes I do).
> What I'd like to know is, why did I have to copy all those entries from
> /lib/modules/2.4.22-1.2149.nptl/modules.usbmap that started with
> "usb-storage" into /etc/hotplug/usb.usermap? I don't really know enough
> about what these entries are but it seems like I shouldn't have had to
> manually copy these cryptic entries to get hotplug to work with my
> usb-storage device. Can anyone offer any insights?
Maybe because no one did this for fedora before ;-)
> It also would have been nice if /var/run/usb storage had already
> existed. Should this directory be created during Fedora Core install?
This is just great - but using it with root permissions is not good.
Maybe we can improve this, setting the camera directory to the logged
user.
--
[]s
Alexandre Ganso
500 FOUR vermelha - Diretor Steel Goose Moto Group
More information about the fedora-list
mailing list