* hotplug not calling script
@ 2006-01-16 15:18 Brandon Metcalf
2006-01-16 18:49 ` Scott James Remnant
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Brandon Metcalf @ 2006-01-16 15:18 UTC (permalink / raw)
To: linux-hotplug
I've just compiled Linux kernel version 2.4.32 with hotplug support,
but now it seems that hotplug is not calling the script I have defined
in /etc/hotplug/usb.usermap when I plug in my camera as the
permissions on the device in /proc/bus/usb/ do not get changed. The
one thing I did differently in compiling this kernel is there are no
modules--everything I need is compiled into the kernel image. I'm not
sure if this matters.
/etc/hotplug/usb.usermap contains:
$ cat /etc/hotplug/usb.usermap
# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
setg2 0x0000 0x04a9 0x3055 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
setg2 contains:
$ cat /etc/hotplug/usb/setg2
#!/bin/sh
date=$(date)
echo "$0: running at $date" > /tmp/setg2.out
chgrp camera $DEVICE 2>>/tmp/setg2.out
chmod 660 $DEVICE 2>>/tmp/setg2.out
And when I plug in my camera, this is what I get in /var/log/messages:
Jan 15 21:06:06 cash kernel: hub.c: new USB device 00:1f.2-1, assigned address 3
Jan 15 21:06:06 cash kernel: usb.c: USB device 3 (vend/prod 0x4a9/0x3055) is not claimed by any active driver.
Hotplug in registered correctly in my kernel as well:
$ cat /proc/sys/kernel/hotplug
/sbin/hotplug
$ ls -l /sbin/hotplug
-rwxr-xr-x 1 root root 1139 2005-04-07 11:37 /sbin/hotplug*
Finally, the following message appears when I start hotplug, but I've
found a couple of USENET postings indicating it can be ignored:
$ sudo /etc/init.d/hotplug start
Starting hotplug subsystem:
pci
pci [success]
usb
** can't synthesize root hub events
usb [success]
isapnp
isapnp [success]
ide
ide [success]
input
input [failed]
scsi
scsi [success]
done.
Thanks.
--
Brandon
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&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: hotplug not calling script
2006-01-16 15:18 hotplug not calling script Brandon Metcalf
@ 2006-01-16 18:49 ` Scott James Remnant
2006-01-16 18:58 ` Brandon Metcalf
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Scott James Remnant @ 2006-01-16 18:49 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
On Mon, 2006-01-16 at 09:18 -0600, Brandon Metcalf wrote:
> /etc/hotplug/usb.usermap contains:
>
> $ cat /etc/hotplug/usb.usermap
> # usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
> setg2 0x0000 0x04a9 0x3055 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
^^^^^^
needs to be 0x0003
Scott
--
Scott James Remnant
scott@ubuntu.com
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: hotplug not calling script
2006-01-16 15:18 hotplug not calling script Brandon Metcalf
2006-01-16 18:49 ` Scott James Remnant
@ 2006-01-16 18:58 ` Brandon Metcalf
2006-01-16 19:33 ` Brandon Metcalf
2006-01-17 17:27 ` Robert Kennedy
3 siblings, 0 replies; 5+ messages in thread
From: Brandon Metcalf @ 2006-01-16 18:58 UTC (permalink / raw)
To: linux-hotplug
s = scott@ubuntu.com writes:
s> On Mon, 2006-01-16 at 09:18 -0600, Brandon Metcalf wrote:
s> > /etc/hotplug/usb.usermap contains:
s> >
s> > $ cat /etc/hotplug/usb.usermap
s> > # usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
s> > setg2 0x0000 0x04a9 0x3055 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
s> ^^^^^^
s> needs to be 0x0003
Thanks for the reply, but unfortunately this did not do the trick. I
should say that before making your suggested change hotplug was doing
the right thing under the previous kernel I was using. Just to be
sure I got it right, below is the updated usb.usermap:
$ cat /etc/hotplug/usb.usermap
# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
setg2 0x0000 0x04a9 0x3055 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x0003 0x00000000
--
Brandon
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&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: hotplug not calling script
2006-01-16 15:18 hotplug not calling script Brandon Metcalf
2006-01-16 18:49 ` Scott James Remnant
2006-01-16 18:58 ` Brandon Metcalf
@ 2006-01-16 19:33 ` Brandon Metcalf
2006-01-17 17:27 ` Robert Kennedy
3 siblings, 0 replies; 5+ messages in thread
From: Brandon Metcalf @ 2006-01-16 19:33 UTC (permalink / raw)
To: linux-hotplug
s = scott@ubuntu.com writes:
s> On Mon, 2006-01-16 at 09:18 -0600, Brandon Metcalf wrote:
s> > /etc/hotplug/usb.usermap contains:
s> >
s> > $ cat /etc/hotplug/usb.usermap
s> > # usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
s> > setg2 0x0000 0x04a9 0x3055 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
s> ^^^^^^
s> needs to be 0x0003
I finally realized that /sbin/hotplug is just a shell script and
noticed it's using /etc/hotplug.d for the default directory. So, I
copied my setg2 script to /etc/hotplug.d/usb/setg2.hotplug and now
everything is working.
So, my next question is, are the contents of /etc/hotplug even being
used? The only thing I can think of is I might of downgraded hotplug
when I got rid of a bunch of testing and unstable packages on my
Debian box and the older version uses /etc/hotplug.d/ which would
explain why it quit working for my camera.
--
Brandon
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&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: hotplug not calling script
2006-01-16 15:18 hotplug not calling script Brandon Metcalf
` (2 preceding siblings ...)
2006-01-16 19:33 ` Brandon Metcalf
@ 2006-01-17 17:27 ` Robert Kennedy
3 siblings, 0 replies; 5+ messages in thread
From: Robert Kennedy @ 2006-01-17 17:27 UTC (permalink / raw)
To: linux-hotplug
It really depends on the hotplug shell script. Depending on the distro, it
could look in /etc/hotplug and its the subdirectories or /etc/hotplug.d/ and
its subdirectories.
Note that hotplug has been deprecated in the later versions of udev. But if
you need to load any special firmware or run special scripts during
hotplugging, you will need to write your own udev rules.
(I believe that udev no longer uses the usb.usermap. Instaed udev relies on
udev rules to provide this function. But someone please correct me if I am
wrong).
I am doing that now since I have switched to udev 079 and the 2.615 kernel.
I am writing some udev rules to load firmware into my old CD Writer using
fxload.
I am glad that I am NOT using the hotplug daemon. I always found the
hotplug daemon slow.
Rob
>From: "Brandon Metcalf" <bmetcalf@nortel.com>
>To: Scott James Remnant <scott@ubuntu.com>
>CC: linux-hotplug-devel@lists.sourceforge.net
>Subject: Re: hotplug not calling script
>Date: Mon, 16 Jan 2006 13:33:20 -0600 (CST)
>
>s = scott@ubuntu.com writes:
>
> s> On Mon, 2006-01-16 at 09:18 -0600, Brandon Metcalf wrote:
>
> s> > /etc/hotplug/usb.usermap contains:
> s> >
> s> > $ cat /etc/hotplug/usb.usermap
> s> > # usb module match_flags idVendor idProduct bcdDevice_lo
>bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass
>bInterfaceSubClass bInterfaceProtocol driver_info
> s> > setg2 0x0000 0x04a9 0x3055 0x0000 0x0000 0x00 0x00
>0x00 0x00 0x00 0x00 0x00000000
> s> ^^^^^^
> s> needs to be 0x0003
>
>
>I finally realized that /sbin/hotplug is just a shell script and
>noticed it's using /etc/hotplug.d for the default directory. So, I
>copied my setg2 script to /etc/hotplug.d/usb/setg2.hotplug and now
>everything is working.
>
>So, my next question is, are the contents of /etc/hotplug even being
>used? The only thing I can think of is I might of downgraded hotplug
>when I got rid of a bunch of testing and unstable packages on my
>Debian box and the older version uses /etc/hotplug.d/ which would
>explain why it quit working for my camera.
>
>--
>Brandon
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc. Do you grep through log
>files
>for problems? Stop! Download the new AJAX search engine that makes
>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
>http://ads.osdn.com/?ad_idv37&alloc_id\x16865&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
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
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:[~2006-01-17 17:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-16 15:18 hotplug not calling script Brandon Metcalf
2006-01-16 18:49 ` Scott James Remnant
2006-01-16 18:58 ` Brandon Metcalf
2006-01-16 19:33 ` Brandon Metcalf
2006-01-17 17:27 ` Robert Kennedy
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).