From mboxrd@z Thu Jan 1 00:00:00 1970 From: Barrie Stott Date: Thu, 29 Nov 2007 08:48:07 +0000 Subject: Help wanted with parallel port rule Message-Id: <20071129084807.GA3912@etch1> 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 Laserjet 4l printer on my parallel port and am having trouble creating a udev rule that will deal with it. Below I give my reasons for what I have done in the hope that someone can tell me where I am going wrong. My main source of information is `Writing udev rules' by Daniel Drake and am using a GNU/Linux system running Debian Lenny. 1. I knew that I had modules parport and parport_pc by looking as the output from lsmod so I ran: ls -lR /sys | grep 'parport:\|parport_pc:' The complicated grep parameter merely restricts the output to desired directories and gave as result: /sys/bus/pci/drivers/parport_pc: /sys/bus/platform/drivers/parport_pc: /sys/bus/pnp/drivers/parport_pc: /sys/module/parport: /sys/module/parport_pc: 2. I chose the smallest of these as simplest to type and ran: udevinfo -a -p /sys/module/parport `Writing udev rules' says that there should be no initial `/sys' but I get the same result with and without it. The essential result from running udevinfo was: looking at device '/module/parport': KERNEL="parport" SUBSYSTEM="module" DRIVER="" ATTR{refcnt}="1" ATTR{initstate}="live" 3. I created the following udev rule from this: KERNEL="parport", SUBSYSTEM="module", DRIVER="", ATTR{refcnt}="1", \ ATTR{initstate}="live", SYMLINK+="ljet4l" I included everything from udevinfo output in case omitting something invalidated the rule. My hope after using the rule was to have a symlink ljet4l somewhere under /dev knowing that there wasn't one already. 4. To test my rule I ran the following (as root) but no ljet4l appeared under /dev as a result. udevcontrol reload_rules; udevtrigger This is essentially the first udev rule I've ever written so I am not dismayed that it is faulty. I just need someone to tell me which part of what I've done is wrong and what it should be instead, the aim being that eventually I get a working rule. Barrie. ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ 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