linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Help wanted with parallel port rule
@ 2007-11-29  8:48 Barrie Stott
  2007-11-29 11:09 ` Kay Sievers
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Barrie Stott @ 2007-11-29  8:48 UTC (permalink / raw)
  To: linux-hotplug

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-11-30  4:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-29  8:48 Help wanted with parallel port rule Barrie Stott
2007-11-29 11:09 ` Kay Sievers
2007-11-29 14:49 ` Barrie Stott
2007-11-29 18:18 ` Bryan Kadzban
2007-11-29 21:06 ` Barrie Stott
2007-11-29 23:32 ` Bryan Kadzban
2007-11-30  4:45 ` Alexander E. Patrakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).