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

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

 



On Thu, 2009-10-08 at 12:20 +0200, ext Frederik Vanrenterghem wrote:
> 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=="add", 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?

The ke-recv daemon does the auto-mounting using the /usr/sbin/osso-mmc-
mount.sh (which is also used for memory cards) shell script. You could
modify the script so that you execute your autoPicturesImport.sh if a
file system was mounted over USB by osso-mmc-mount.sh. You can see those
from the mount point argument, which is prefixed with "/media/usb" when
such a file system is about to be mounted.

-Kimmo

> 
> Thanks in advance for your insight!
> 
> Best regards,
> Frederik
> 
> 

_______________________________________________
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