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

Re: Automatic download from camera.



On Mon, Feb 27, 2006 at 06:50:27PM -0600, David Berg wrote:
> I've been trying to figure out how to have my photos downloaded
> automatically when I plug in my camera/memory chip.  After looking
> through the hotplug scripts for a week, I am still no closer to a
> solution.  The most irritating thing is that when connecting the
> camera in gnome, gnome-volume-manager takes care of it.  So it would
> seem that I just need to have the system run my script instead of
> gnome-volume-manager.  Apparently its not that easy.
> 
> Here are the questions I have.  First, how do I go about ensuring that
> I have a consistent link to the device in /dev when it is plugged in? 
> On a fresh boot it seems that when I use the card reader it is at
> /dev/sdd1 but if I use the camera and cable, its at sda1.  Just before
> I rebooted though all kinds of sd?? devices were being created and I
> couldn't mount any of them for various reasons.  Then the system
> froze.  Hopefully that was a fluke.
> 
> Second question is how do I go about having a script called when the
> kernel sees the device?  I'm running on sarge so i believe hotplug is
> the appropriate place.
Hi Dave,
I have followed various exchanges on debian-user and debian-devel about
inconsistent or uncertain device nameing from continuing developement in
udev. Someone suggested a way to avoid this issue by not relying on the
'standard' kernel device nameing and create via udev rules a consistent
device name. 

Here is the main example:
a computer has 2 ethernet device: card #1 or card #2
the kernel creates 2 device after boot: eth0 and eth1
but you can not be sure which is which to properely configure your
firewall rules

SOLUTION: use udev rules to create the alternate device names
/dev/firewall_in and /dev/firewall_out by using device characteristics
that are device specific then you can configure:
inbound_port=/dev/firewall_in
outbound_port=/dev/firewall_out
in your config file.

hope this helps.
Cheers,
Kev
-- 
|  .''`.  == Debian GNU/Linux == |       my web site:       |
| : :' :      The  Universal     | debian.home.pipeline.com |
| `. `'      Operating System    | go to counter.li.org and |
|   `-    http://www.debian.org/ |    be counted! #238656   |
|     my keysever: pgp.mit.edu   |     my NPO: cfsg.org     |

Attachment: signature.asc
Description: Digital signature


Reply to: