[maemo-users] N810 - executing script when digital camera is plugged in and mounted
From: Frederik Vanrenterghem frederik at vanrenterghem.bizDate: Sat Oct 10 00:56:04 EEST 2009
- Previous message: N810 - executing script when digital camera is plugged in and mounted
- Next message: Transfering contacts to N900
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks Kimmo. String comparison in bourne shell turned out to be somewhat hard for me after all, but the following does indeed work: if [ "$(echo $MP | cut -c0-10)" == "/media/usb" ]; then /home/user/autoPicturesImport.sh fi This is still rather crude though, as it doesn't check at all which brand of camera has been mounted (if it's even a camera). That's something which udev supports rather trivially, which is why I was hoping to work that route. If anybody has any further thoughts on that, I'd still be interested to see them! In the mean time, thanks for the advice. I should be on my way now!! Best regards, Frederik 2009/10/9 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> > On Fri, 2009-10-09 at 13:17 +0200, ext Frederik Vanrenterghem wrote: > > This seems like a good option if it can't be done directly with udev. > > It would be less clean a solution though, as now every usb disk I'd > > insert would get treated the same way. > > > > Ideally I'd actually like to do a reverse procedure as well: when I > > plug in a USB harddrive, I'd like the pictures to be backed up on it. > > This seems possible thanks to the flexibility of udev, but a lot > > harder to realise via the approach below. > > I don't know how isn't done with udev, but can't be much simpler... I > mean string comparison is not so hard :) > > > Is this ke-recv daemon being triggered by udev, or is that a separate > > way of working altogether? > > ke-recv uses libhal and the HAL daemon. HAL is based on sysfs and udev > for detecting the HW changes AFAIK. > > -Kimmo > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.maemo.org/pipermail/maemo-users/attachments/20091009/1235a9cf/attachment.htm
- Previous message: N810 - executing script when digital camera is plugged in and mounted
- Next message: Transfering contacts to N900
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]