From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Looking for a clue in how udev, hal, hotplug and dbus work together
Date: Tue, 13 Sep 2005 17:03:51 +0000 [thread overview]
Message-ID: <20050913170351.GB28713@vrfy.org> (raw)
In-Reply-To: <Pine.LNX.4.62.0509130029170.13989@www.mcquillansystems.com>
On Tue, Sep 13, 2005 at 12:50:24AM -0400, Jim McQuillan wrote:
> I'm trying to get a grasp on how udev, hal, hotplug and dbus play
> together in detecting devices.
>
> I'm doing this for LTSP (Linux Terminal Server Project). This is
> Thin-clients in Linux. We currently have the ability to plug a usb
> device in, such as a mini-cruizer USB memory stick. When the device is
> inserted, we have a hotplug script written in perl, that gets the event
> from the kernel, figures out what kind of device it is, loads the
> appropriate kernel modules, mounts the filesystem on the device, and
> then signals the server that a new device is available. This is all
> under a 2.4.26 kernel.
>
> Now, I'm moving up to a 2.6.13 kernel, and I'd like to do things the
> "right way". That is, I'm dropping devfs, and using udev. I'm thinking
> that to use udev, then I also should be using hal and dbus. But so far,
> i've not been able to wrap my head around how it all works together.
>
> from what I've read, it seems that I should be setting
> /proc/sys/kernel/hotplug to "", and that "netlink" is now used for the
> kernel to send messages to udev. Then, udev sends messages to hald.
udevd listens to kernel uevents over netlink and the event gets matched
against the udev rules, a node created if needed and all postprocessing
hooks (RUN=) in matching udev rules are executed.
/proc/sys/kernel/hotplug should be disabled, but the "input" layer lacks
sysfs support so you need /sbin/udevsend here until that is fixed.
> So, my question is, when a new USB device is plugged in, take the
> 'mini-cruizer' memory stick for example, at what point is the kernel
> module loaded? Does 'hald' handle that? or do I still need "hotplug"
> scripts.
The kernel offers a modalias file in sysfs that signifies that a driver
needs to be loaded. You can do this with a simple generic udev rule or
any other facility. Just running modprobe with the content of the
modlias file should be able to replace almost all old hotplug stuff.
> Once the mini-cruizer is detected, where to I put my hooks in, to signal
> the server that a new device is available?
What kind of server?
Kay
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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
next prev parent reply other threads:[~2005-09-13 17:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-13 4:50 Looking for a clue in how udev, hal, hotplug and dbus work together Jim McQuillan
2005-09-13 17:03 ` Kay Sievers [this message]
2005-09-13 17:12 ` Looking for a clue in how udev, hal, hotplug and dbus work Jim McQuillan
2005-09-13 17:27 ` Looking for a clue in how udev, hal, hotplug and dbus work together Kay Sievers
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=20050913170351.GB28713@vrfy.org \
--to=kay.sievers@vrfy.org \
--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).