From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Barry Date: Wed, 17 Mar 2004 07:44:40 +0000 Subject: Re: renaming causes incorrect device creation Message-Id: <200403170944.40598.bobb@absamail.co.za> MIME-Version: 1 Content-Type: multipart/mixed; boundary="Boundary-00=_oHAWA//9wN5cHeQ" List-Id: References: <20040317021453.GA13348@perl.xsdg.org> In-Reply-To: <20040317021453.GA13348@perl.xsdg.org> To: linux-hotplug@vger.kernel.org --Boundary-00=_oHAWA//9wN5cHeQ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 17 March 2004, xsdg wrote: > Normally, when I plug in my camera, I see (in /udev/): >=20 > brw------- =A0 =A01 root =A0 =A0 root =A0 =A0 =A0 8, =A0 0 2004-03-17 01:= 53 sda > brw------- =A0 =A01 root =A0 =A0 root =A0 =A0 =A0 8, =A0 1 2004-03-17 01:= 53 sda1 >=20 > I then add to udev.rules: > BUS=3D"scsi", SYSFS{model}=3D"Sony DSC =A0 =A0 =A0 =A0", NAME=3D"removabl= e/camera%n" I used the following rule successfully... # USB storage of Sony DSC-31 camera BUS=3D"usb", SYSFS{product}=3D"Sony DSC" NAME=3D"%k" SYMLINK=3D"camera" =2E..until I built the "generic devices" module, and found that char device= sg2 was being assigned to the camera. So I changed the rule and it works again: # USB storage of Sony DSC-31 camera BUS=3D"usb", KERNEL=3D"sd*", SYSFS{product}=3D"Sony DSC" NAME=3D"%k" SYMLIN= K=3D"camera" OT: The script I use to download from the camera is attached. --Boundary-00=_oHAWA//9wN5cHeQ Content-Type: application/x-shellscript; name="getpix" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="getpix" #!/bin/ksh [[ -b /dev/camera ]] && mount /mnt/camera || { cat << ! Camera device does not exist. Is Sony DSC-P31 camera connected? Is camera power on? ! exit } (( $(ls /mnt/camera/dcim/*/*.jpg 2>/dev/null | wc -l) == 0 )) && { cat << ! Camera picture storage is empty. ! umount /mnt/camera exit } newpicdir=$HOME/photos/new [[ -d $newpicdir ]] || mkdir -p $newpicdir print -n "\n\tmoving photos from camera to disc: " for pic in /mnt/camera/dcim/*/*.jpg do mv $pic $newpicdir/ print -n "#" done print "\n\n done\n" umount /mnt/camera /usr/bin/gqview $newpicdir --Boundary-00=_oHAWA//9wN5cHeQ-- ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel