linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev/hotplug success story
@ 2004-02-08 21:11 Daniel Drake
  2004-02-08 23:50 ` Måns Rullgård
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Daniel Drake @ 2004-02-08 21:11 UTC (permalink / raw)
  To: linux-hotplug

Hi Greg,

Thought you might be interested to know that I've got my setup working great 
with udev controlling /dev.

I'm running a gentoo based system, kernel 2.6.2-mm1, udev 016, hotplug 20040105

A few comments:

With the default devfs-like config, udev correctly places a symlink to 
/dev/hdc as /dev/cdroms/cdrom0.
With devfs, I had it setup so that I could also use /dev/dvd there. Writing a 
rule for udev to do that is no problem. I told it to name the device "hdc" and 
SYMLINK "dvd". The only thing there, is that it then overwrote the devfs-like 
rule, and /dev/cdroms/cdrom0 no longer existed. In the end I just added 
another SYMLINK to cdroms/cdrom0, but I was wondering, is there a better way - 
are there rules that I can pass that append SYMLINKs onto other ones?


Hotplug is doing a good job of managing my usb modules. When I plug my camera 
in, it loads usb-storage as expected. However, it doesnt load sd_mod, meaning 
that no /dev/sda1 is created, and I can't access my pictures.

I could easily get around this by writing a script to "modprobe sd_mod", and 
then adding a line to /etc/hotplug/usb.usermap.

To better fit in with the purpose of hotplugging, I would think that this 
module should be loaded automatically after usb-storage. Is this a 
bug/missing-feature, or intentional?


Final comment: I think that the documentation for hotplug is a little lacking. 
In particular, I had trouble finding out what the match_flags column in 
usb.usermap does, I eventually found the answer by looking through the code of 
usb.agent


cheers,

Daniel


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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] 5+ messages in thread

* Re: udev/hotplug success story
  2004-02-08 21:11 udev/hotplug success story Daniel Drake
@ 2004-02-08 23:50 ` Måns Rullgård
  2004-02-09 23:12 ` Patrick Mansfield
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Måns Rullgård @ 2004-02-08 23:50 UTC (permalink / raw)
  To: linux-hotplug

Daniel Drake <dan@reactivated.net> writes:

> Hotplug is doing a good job of managing my usb modules. When I plug my
> camera in, it loads usb-storage as expected. However, it doesnt load
> sd_mod, meaning that no /dev/sda1 is created, and I can't access my
> pictures.

It used to load sd-mod automatically for me, but stopped some time
around 2.6.2-rc1.

> I could easily get around this by writing a script to "modprobe
> sd_mod", and then adding a line to /etc/hotplug/usb.usermap.
>
> To better fit in with the purpose of hotplugging, I would think that
> this module should be loaded automatically after usb-storage. Is this
> a bug/missing-feature, or intentional?

Hacking modprobe.conf to get that behavior is trivial.

-- 
Måns Rullgård
mru@kth.se



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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] 5+ messages in thread

* Re: udev/hotplug success story
  2004-02-08 21:11 udev/hotplug success story Daniel Drake
  2004-02-08 23:50 ` Måns Rullgård
@ 2004-02-09 23:12 ` Patrick Mansfield
  2004-02-13  1:38 ` Greg KH
  2004-03-03 21:48 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Patrick Mansfield @ 2004-02-09 23:12 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Feb 09, 2004 at 12:50:50AM +0100, Måns Rullgård wrote:
> Daniel Drake <dan@reactivated.net> writes:
> 
> > Hotplug is doing a good job of managing my usb modules. When I plug my
> > camera in, it loads usb-storage as expected. However, it doesnt load
> > sd_mod, meaning that no /dev/sda1 is created, and I can't access my
> > pictures.
> 
> It used to load sd-mod automatically for me, but stopped some time
> around 2.6.2-rc1.

We could race looking for the sys attribute type in scsi.agent.

That is scsi attributes are added after the hotplug is invoked.

Is there anything in your log file from scsi.agent? Like this one:

	mesg "how to add device type=$TYPE at $DEVPATH ??"

If so, try adding a sleep 1 in scsi.agent just before the cat of type,
i.e.:

	sleep 1
	TYPE=$(cat /sys/$DEVPATH/type)

-- Patrick Mansfield


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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] 5+ messages in thread

* Re: udev/hotplug success story
  2004-02-08 21:11 udev/hotplug success story Daniel Drake
  2004-02-08 23:50 ` Måns Rullgård
  2004-02-09 23:12 ` Patrick Mansfield
@ 2004-02-13  1:38 ` Greg KH
  2004-03-03 21:48 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2004-02-13  1:38 UTC (permalink / raw)
  To: linux-hotplug

On Sun, Feb 08, 2004 at 09:11:16PM +0000, Daniel Drake wrote:
> 
> Final comment: I think that the documentation for hotplug is a little 
> lacking. In particular, I had trouble finding out what the match_flags 
> column in usb.usermap does, I eventually found the answer by looking 
> through the code of usb.agent

I agree, although a user should never have to muck around with those
files, use the automatically generated ones :)

But if you want to write something up, I'd be glad to add it to the
package.

thanks,

greg k-h


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
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] 5+ messages in thread

* Re: udev/hotplug success story
  2004-02-08 21:11 udev/hotplug success story Daniel Drake
                   ` (2 preceding siblings ...)
  2004-02-13  1:38 ` Greg KH
@ 2004-03-03 21:48 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2004-03-03 21:48 UTC (permalink / raw)
  To: linux-hotplug

On Sun, Feb 08, 2004 at 09:11:16PM +0000, Daniel Drake wrote:
> 
> Hotplug is doing a good job of managing my usb modules. When I plug my 
> camera in, it loads usb-storage as expected. However, it doesnt load 
> sd_mod, meaning that no /dev/sda1 is created, and I can't access my 
> pictures.

This is bug in the current release of the hotplug scripts.  A fix for
this has been posted to the mailing list.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2004-03-03 21:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-08 21:11 udev/hotplug success story Daniel Drake
2004-02-08 23:50 ` Måns Rullgård
2004-02-09 23:12 ` Patrick Mansfield
2004-02-13  1:38 ` Greg KH
2004-03-03 21:48 ` Greg KH

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).