From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alexander E. Patrakov" Date: Fri, 30 Nov 2007 04:45:37 +0000 Subject: Re: Help wanted with parallel port rule Message-Id: List-Id: References: <20071129084807.GA3912@etch1> In-Reply-To: <20071129084807.GA3912@etch1> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 2007/11/30, Bryan Kadzban : > -----BEGIN PGP SIGNED MESSAGE----- > Hash: RIPEMD160 > > (CC'ing the new list as well. I'm not sure if this'll make it to the > old list now that I'm unsubscribed from it, but we'll see.) > > Barrie Stott wrote: > > I didn't have /dev/lp0 and couldn't find a good way to get it. Now it > > comes by using `modprobe lp' and vanishes again with `rmmod lp'. And I > > can use udev info with /dev/lp0 now as well. Things are looking up. > > :-) > > One other thing you should probably know: There's also a virtual "bus" > at /sys/devices/pnp0/ (and possibly pnp*) whose device directories > contain an "id" file. This file contains the PNP ID of the device, and > can be used (with an appropriate udev rule, like the one in udev-117's > etc/udev/rules.d/80-drivers.rules file) to load modules automatically > from the PNP "bus". > > I say this because the /sys/class/printer/lp0/ item's parent device is > on the PNP bus on my machine (it's /sys/devices/pnp0/00:06), and has an > ID of PNP0401 (for an ECP port, or PNP0400 for a non-ECP port). The > parport_pc module also has a pair of modaliases (in recent kernels), of > pnp:dPNP0401 or pnp:dPNP0400. So the pnp0/00:06 device will (with the > rule above) load the parport_pc module automatically. > > (However, that still won't get you the lp module. I think the only way > to get that is to either load it manually, or build it into the kernel. > I used to have a modprobe.conf rule to automatically load it, but I > deleted that when I started building it into the kernel.) Indeed, a modprobe.conf line is what you need: install parport /sbin/modprobe -i parport ; /sbin/modprobe lp ; /sbin/modprobe ppdev ; : Of course, it will work only if both parport and lp are modules. -- Alexander E. Patrakov ------------------------------------------------------------------------- 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