Robert Kennedy | 1 Dec 01:37 2005
Picon

udev, fxload and hotplugging

Got hotplugging to work with fxload.  Only one small problem.  At boot up, 
fxload typically only loads one of the firmware programs into my USB CD-RW 
Drive during the hotplug script.   The CD-RW will not work until two 
firmware programs are loaded into the CD-RW.

But after the computer has booted up, I can get fxload to load both firmware 
programs simply by unplugging and plugging back in the USb cable.  It looks 
like a problem with the hotplug startup scripts.

Og yes, can someone tell me how to set up a symlink in /dev during startup.  
I would like a symlink from /dev/cdwriter to /dev/sr0.

If a create a symlink manually in /dev from /dev/cdwriter to /dev/sr0, the 
symlink disappears at the next boot up.  (I beleive that is normal with /dev 
and /sys with the 2.6.x kernel).

Does udev provide a better place than just using the .bashrc file?

Rob

-------------------------------------------------------
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_id=7637&alloc_id=16865&op=click
Moshe Yudkowsky | 1 Dec 05:19 2005

Re: Does RUN work with "remove" events?

Kay Sievers wrote:

 > On Wed, Nov 30, 2005 at 04:14:45PM -0600, Moshe Yudkowsky wrote:
 >
 >> I've written a udev rule to add a UMS flash drive with device name 
/dev/ums:
 >>
 >> SYSFS{product}=="Flash Disk", NAME="ums", RUN+="/etc/hotplug/usb/ums"
 >
 >
 >
 > Sysfs values are not readable at remove, cause the device directory is
 > already gone. You need to match against properties which you can see in
 > udevmonitor --env or you need to store a custom key with ENV{key}="value"
 > in the database, which is imported on remove.

Kay,

Thank you very much. I suspected that something of the sort was 
happening; but I wasn't aware that custom keys for ENV were possible. 
(It's not on the man page.)

Here's my fix. I've created the following rules:

ACTION=="add", SYSFS{product}=="Flash Disk",  NAME="ums", 
RUN+="/etc/hotplug/usb/ums", ENV{flashdrive}="%p"

ACTION=="remove", ENV{flashdrive}=="%p", RUN+="/etc/hotplug/usb/ums"

The first rule sets, on an "add," the custom environment variable 
(Continue reading)

Aras Vaichas | 1 Dec 05:34 2005

Re: problem with PROGRAM

Kay Sievers wrote:
> On Wed, Nov 30, 2005 at 10:43:30AM -0600, linas wrote:
>>I am guessing/hoping that quotes are escaped, so that the 
>>following might work:
>>
>>ACTION=="remove", PHYSDEVDRIVER=="usbnet", PROGRAM="/bin/sh -c \"/usr/bin/cat 
>>/var/run/autoipd-usb0.pid | /usr/bin/xargs /bin/kill\" "
> 
> 
> No, escaping will not work, you need an external script.  And PHYSDEVDRIVER
> is not a key, udev will recognize, it is just ignored, you probably want
> ENV{PHYSDEVDRIVER}==.

I took a look at udev_tools_run.c and I see why it doesn't work. I understand 
why it shouldn't work the way I was trying to make it work either. Thanks.

I also realised that running autoipd was leaving a zombie process that was 
stopping my remove rule from executing.

rule:
KERNEL=="usb[0-9]", ACTION=="add", ENV{PHYSDEVDRIVER}=="usbnet", 
PROGRAM="/etc/udev/scripts/start_autoipd.sh %k"

start_autoipd.sh:
logger "$0 is attempting to start autoipd -i $1"
autoipd -i $1
logger "$0 successful"
exit 0

plug in the USB ethernet device:
(Continue reading)

Aras Vaichas | 1 Dec 06:00 2005

Re: problem with PROGRAM

Aras Vaichas wrote:
> rule:
> KERNEL=="usb[0-9]", ACTION=="add", ENV{PHYSDEVDRIVER}=="usbnet", 
> PROGRAM="/etc/udev/scripts/start_autoipd.sh %k"

UPDATE:

I changed the rule from PROGRAM to RUN like so:
KERNEL=="usb[0-9]", ACTION=="add", ENV{PHYSDEVDRIVER}=="usbnet", 
RUN+="/etc/udev/scripts/start_autoipd.sh %k"

and the process no longer becomes a zombie and it all appears to work correctly.

Why would PROGRAM cause this situation but RUN doesn't?

regards,

Aras Vaichas

-------------------------------------------------------
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_id=7637&alloc_id=16865&op=click
Rob Dyck | 1 Dec 18:49 2005
Picon

Received a log requesting I report this trouble

Dec  1 09:44:40 fatboy kernel: usb 3-1: new full speed USB device using 
uhci_hcd and address 27
Dec  1 09:44:43 fatboy kernel: usb 3-1: new full speed USB device using 
uhci_hcd and address 28
Dec  1 09:44:43 fatboy kernel: usb 3-1: Product: USB Phone
Dec  1 09:44:43 fatboy kernel: usb 3-1: Manufacturer: BeyondTel
Dec  1 09:44:43 fatboy kernel: usb 3-1: SerialNumber: 0001
Dec  1 09:44:49 fatboy wait_for_sysfs[18031]: either wait_for_sysfs (udev 039) 
needs an update to handle the device 
'/devices/pci0000:00/0000:00:10.1/usb3/3-1/3-1:1.3' properly (no bus device 
link) or the sysfs-support of your device's driver needs to be fixed, please 
report to <linux-hotplug-devel <at> lists.sourceforge.net>

-------------------------------------------------------
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_id=7637&alloc_id=16865&op=click
Kay Sievers | 2 Dec 04:03 2005

Re: problem with PROGRAM

On Thu, Dec 01, 2005 at 04:00:49PM +1100, Aras Vaichas wrote:
> Aras Vaichas wrote:
> >rule:
> >KERNEL=="usb[0-9]", ACTION=="add", ENV{PHYSDEVDRIVER}=="usbnet", 
> >PROGRAM="/etc/udev/scripts/start_autoipd.sh %k"
> 
> UPDATE:
> 
> I changed the rule from PROGRAM to RUN like so:
> KERNEL=="usb[0-9]", ACTION=="add", ENV{PHYSDEVDRIVER}=="usbnet", 
> RUN+="/etc/udev/scripts/start_autoipd.sh %k"
> 
> and the process no longer becomes a zombie and it all appears to work 
> correctly.
> 
> Why would PROGRAM cause this situation but RUN doesn't?

PROGRAM is to request information from external programs to name a
device. It is not to start or run anything else. RUN will run after
the device node is created. But there is no real reason to behave
differently in your case.

Again, make sure you are detaching immediately from the event process,
and don't block longer than needed, not in PROGRAM, and not in RUN. It
will cause problems for the event sequence handling. Start your program
in the background and just exit.

Kay

-------------------------------------------------------
(Continue reading)

Kay Sievers | 2 Dec 03:56 2005

Re: Received a log requesting I report this trouble

On Thu, Dec 01, 2005 at 09:49:08AM -0800, Rob Dyck wrote:
> Dec  1 09:44:40 fatboy kernel: usb 3-1: new full speed USB device using 
> uhci_hcd and address 27
> Dec  1 09:44:43 fatboy kernel: usb 3-1: new full speed USB device using 
> uhci_hcd and address 28
> Dec  1 09:44:43 fatboy kernel: usb 3-1: Product: USB Phone
> Dec  1 09:44:43 fatboy kernel: usb 3-1: Manufacturer: BeyondTel
> Dec  1 09:44:43 fatboy kernel: usb 3-1: SerialNumber: 0001
> Dec  1 09:44:49 fatboy wait_for_sysfs[18031]: either wait_for_sysfs (udev 039) 
> needs an update to handle the device 
> '/devices/pci0000:00/0000:00:10.1/usb3/3-1/3-1:1.3' properly (no bus device 
> link) or the sysfs-support of your device's driver needs to be fixed, please 
> report to <linux-hotplug-devel <at> lists.sourceforge.net>

Huh, long time none of these messages. :) Update your installation with
the provided updates and this will go away.

Thanks,
Kay

-------------------------------------------------------
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_id=7637&alloc_id=16865&op=click
kylin | 2 Dec 07:01 2005
Picon

any whitepaper for the linux hotplug interface progress

hello everyone:
              it have been some time since my last visit the maillist
i feel myself out of the date of the linux hotplug usermode and 
communication technology
,is there any info about how are the linux hotplug ,including udev going on ?
waiting for ur kind reply :) thank u

--
we who r about to die,salute u!

-------------------------------------------------------
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_id865&op=click
Kay Sievers | 2 Dec 17:45 2005

Re: any whitepaper for the linux hotplug interface progress

On Fri, Dec 02, 2005 at 02:01:04PM +0800, kylin wrote:
> hello everyone:
>               it have been some time since my last visit the maillist
> i feel myself out of the date of the linux hotplug usermode and 
> communication technology
> ,is there any info about how are the linux hotplug ,including udev going on ?
> waiting for ur kind reply :) thank u

There are just the packages from the distros who are working on it. It's
pretty straighforward what we do now compared to what we did in the
past.

A few things are in the udev README file, but there is no general
documentaion about how "hotplug" works today. I'm expected to write
something for the "SUSE Administration Guide" during the next two weeks,
which will give an overview about it. It will be available on the web,
but I just started writing things down. :)

Kay

-------------------------------------------------------
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_id=7637&alloc_id=16865&op=click
Andreas Jellinghaus | 2 Dec 19:08 2005

status of /etc/hotplug/usb/

Hi,

I read that debian killed that directory and thus
openct was no longer working(1).

So I wonder what the position of the hotplug and udev
people here is on /etc/hotplug/usb/, what the replacement
is (I guess udev rules files), and if there is some
paper with reasoning and suggestions for the transition.
any link would be fine.

Regards, Andreas
(1) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=338699
p.s. if anyone has a link for the "NEWS.Debian" file mentioned
in the bugmail, that would be nice.

-------------------------------------------------------
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_id=7637&alloc_id=16865&op=click

Gmane