[vox-tech] udev rule syntax (was: KDE with automounter, external hard disk, and rsync)

Matt Roper matt at mattrope.com
Tue May 16 23:21:08 PDT 2006


On Tue, May 16, 2006 at 03:11:28PM -0500, Ken Bloom wrote:
...
> > point of the HD. I'd like to ensure that the HD is always mounted to the
> > same mountpoint (e.g., /media/backupHD) and likewise for the camera
> > (e.g., /media/camera). Any suggestions? Does there exist a GUI version
> > of rsync for KDE that would operate better in this situation? A web
> > search failed to find such a thing.
> 
> Write some udev rules to give them consistent device names (or
> symlinks), then create mount points and fstab entries for them.A For
> example, for my camera I have the rule:
> KERNEL="sd?1",SYSFS{model}="ACEMAR          ",SYSFS{vendor}="IDIGAT L",SYMLINK="camera"
> 
> the KERNEL="sd?1" rule says that partion 1 of whatever scsi device...
> 
> --Ken

Just a quick note; I was using some udev rules similar to what Ken
posted above and found that they suddenly stopped working a little while
ago.  I finally got around to tracking down the problem yesterday and
found that the syntax of the udev rules (under Debian sid) has now
changed slightly; the KERNEL and SYSFS _tests_ now require "==" as the
operator instead of "="; the SYMLINK and NAME _assignments_ still use a
single "=" sign.

To make this more clear, here's what my rules look like now:

    mattrope at hades:~$ cat /etc/udev/rules.d/060_local.rules 
    # Local udev rules

    # Iomega USB hard drive
    BUS=="usb", KERNEL=="sd?1", SYSFS{product}=="Iomega HDD USB 2.0 Drive", NAME="%k", SYMLINK="usbhd"

    # Neuros MP3 player
    BUS=="usb", KERNEL=="sd?1", SYSFS{product}=="NEUROS Digital Audio Device", NAME="%k", SYMLINK="neuros"

    # Picture Card reader
    BUS=="usb", KERNEL=="sd?1", SYSFS{product}=="Flash Reader", NAME="%k", SYMLINK="piccard"

Unfortunately I wasn't paying close enough attention to say exactly what
version of udev the syntax changed in; I'm not sure if the change has
propagated to Debian testing yet or whether it's present in other
distributions, but I figured I should post this for future reference in
case anybody else runs across this issue.


Matt

-- 

*************************************************
* Matt Roper <matt at mattrope.com>                *
* http://www.mattrope.com                       *
* PGP Key: http://www.mattrope.com/mattrope.asc *
*************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://ns1.livepenguin.com/pipermail/vox-tech/attachments/20060516/bfd59ba2/attachment.pgp


More information about the vox-tech mailing list