linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Barrie Stott <G.B.Stott@bolton.ac.uk>
To: linux-hotplug@vger.kernel.org
Subject: Help wanted with parallel port rule
Date: Thu, 29 Nov 2007 08:48:07 +0000	[thread overview]
Message-ID: <20071129084807.GA3912@etch1> (raw)

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

             reply	other threads:[~2007-11-29  8:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29  8:48 Barrie Stott [this message]
2007-11-29 11:09 ` Help wanted with parallel port rule 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071129084807.GA3912@etch1 \
    --to=g.b.stott@bolton.ac.uk \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).