Re: N810 - executing script when digital camera is plugged in and mounted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sounds sensible indeed. How do I actually prevent the automount though? I have tried figuring this out with udevmonitor, but can't really tell what's happening.

It seems my script gets run somewhere in the middle of the following sequence, instead of at the end:

UEVENT[1255026948.392547] add      /devices/platform/musb_hdrc/usb1/1-1 (usb)
UEVENT[1255026948.393310] add      /class/usb_endpoint/usbdev1.18_ep00 (usb_endpoint)
UEVENT[1255026948.393585] add      /devices/platform/musb_hdrc/usb1/1-1/1-1:1.0 (usb)
UEVENT[1255026948.393798] add      /class/scsi_host/host6 (scsi_host)
UEVENT[1255026948.393981] add      /class/usb_endpoint/usbdev1.18_ep01 (usb_endpoint)
UEVENT[1255026948.394165] add      /class/usb_endpoint/usbdev1.18_ep82 (usb_endpoint)
UEVENT[1255026948.394378] add      /class/usb_endpoint/usbdev1.18_ep83 (usb_endpoint)
UEVENT[1255026948.394561] add      /class/usb_device/usbdev1.18 (usb_device)
UDEV  [1255026948.498626] add      /devices/platform/musb_hdrc/usb1/1-1 (usb)
UDEV  [1255026948.655029] add      /class/usb_endpoint/usbdev1.18_ep00 (usb_endpoint)
UDEV  [1255026948.701416] add      /devices/platform/musb_hdrc/usb1/1-1/1-1:1.0 (usb)
UDEV  [1255026948.794860] add      /class/scsi_host/host6 (scsi_host)
UDEV  [1255026948.832946] add      /class/usb_endpoint/usbdev1.18_ep01 (usb_endpoint)
UDEV  [1255026948.870971] add      /class/usb_endpoint/usbdev1.18_ep82 (usb_endpoint)
UDEV  [1255026948.890533] add      /class/usb_endpoint/usbdev1.18_ep83 (usb_endpoint)
UDEV  [1255026948.963012] add      /class/usb_device/usbdev1.18 (usb_device)

here?

UEVENT[1255026953.385009] add      /devices/platform/musb_hdrc/usb1/1-1/1-1:1.0/host6/target6:0:0/6:0:0:0 (scsi)
UEVENT[1255026953.385467] add      /class/scsi_disk/6:0:0:0 (scsi_disk)
UEVENT[1255026953.458374] add      /block/sda (block)
UEVENT[1255026953.458801] add      /block/sda/sda1 (block)
UEVENT[1255026953.459045] add      /class/scsi_device/6:0:0:0 (scsi_device)
UDEV  [1255026953.488525] add      /devices/platform/musb_hdrc/usb1/1-1/1-1:1.0/host6/target6:0:0/6:0:0:0 (scsi)
UDEV  [1255026953.726104] add      /class/scsi_disk/6:0:0:0 (scsi_disk)
UDEV  [1255026953.755218] add      /block/sda (block)
UDEV  [1255026953.778747] add      /class/scsi_device/6:0:0:0 (scsi_device)
UDEV  [1255026953.847900] add      /block/sda/sda1 (block)
UEVENT[1255026955.123718] mount    /block/sda/sda1 (block)
UDEV  [1255026955.834564] mount    /block/sda/sda1 (block)


On Thu, Oct 8, 2009 at 8:25 PM, Adrián Yanes  wrote:
Try yo exclude your camera for automount. Then include in your script the command mount and after done ( you can obtain some scripts for detect the partition without automount). Probably works, because I think that your problem it's desynchronization, in one way you are mouting and in the other executing a script ( that sometimes works and others not I suppouse ... depend of the charge of the system).

Try to put all in the same script, this will be de process sequential.

Regards, Adrian.

2009/10/8 Frederik Vanrenterghem
Hi all,

I would like to execute a script that copies the pictures from my digital camera when it's plugged into my nokia tablet. The script functions correctly when executed from the command-line after plugging in the camera.

Adding the following rule to /etc/udev/rules.d/zz99_camera.rules works only partially:
ACTION="" BUS=="usb", \
  SYSFS{idVendor}=="054c", SYSFS{idProduct}=="0010", \
  RUN+="/home/user/autoPicturesImport.sh"

The script is executed correctly, but it can't copy anything from the mounted camera, as the file system on it is not available. That is made available only once this script completes (as evidenced by including a long sleep command in there).

How can I ensure all actions to automount the camera are completed before this script is executed?

Thanks in advance for your insight!

Best regards,
Frederik


_______________________________________________
maemo-users mailing list
maemo-users@xxxxxxxxx
https://lists.maemo.org/mailman/listinfo/maemo-users



_______________________________________________
maemo-users mailing list
maemo-users@xxxxxxxxx
https://lists.maemo.org/mailman/listinfo/maemo-users


_______________________________________________
maemo-users mailing list
maemo-users@xxxxxxxxx
https://lists.maemo.org/mailman/listinfo/maemo-users

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux