From: Bob Barry Date: Wed, 21 Jan 2004 17:24:08 +0000 Subject: udev rule for usb printer Message-Id: <200401211924.08672.bobb@absamail.co.za> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org I have a Lexmark Z52 usb printer. To get it going I put the following into /etc/udev/udev.rules: # USB Lexmark Z52 printer to be called lp_Z52 BUS="usb", SYSFS_product="Lexmark Z52", NAME="lp_Z52", SYMLINK="usblp0" But hotplug/udev ignored it and started: crw-rw---- 1 root lp 180, 0 2004-01-08 17:46 /dev/lp0 with no symlink. I got the "product" label from: asterix:udev> cd /sys asterix:sys> find . -type f | xargs grep Z52 2>/dev/null ./devices/pci0000:00/0000:00:02.0/usb1/1-1/product:Lexmark Z52 To be very sure of what was in the string: asterix:sys> s=$(find . -type f | xargs grep Z52 2>/dev/null); s=${s}"XX"; echo $s ./devices/pci0000:00/0000:00:02.0/usb1/1-1/product:Lexmark Z52XX asterix:sys> echo ${s##*:} Lexmark Z52XX asterix:sys> echo ${s##*:} | od -t x1 0000000 4c 65 78 6d 61 72 6b 20 5a 35 32 58 58 0a 0000016 asterix:sys> Should my rule with SYSFS_product have worked? Is my syntax wrong? Where am I misunderstanding? Newbies like me could use heaps more rule examples. TIA, Bob Barry ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ 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