Re: udevsend and hotplug

2005-07-11 Thread Dan McGhee

kareemy wrote:


Hello,

I noticed that the lfs bootscripts changed to echo /sbin/udevsend into
/proc/sys/kernel/hotplug instead of /sbin/hotplug.

Does hotplug ever get called anymore in this case?

My problem is with my digital camera. It does not have a /dev entry.
When I plug it in, a new entry is created in /proc/bus/usb along with
some very hidden usb entry in the /sys filesystem usually
/sys/class/usb_host/usb2/device/usb2/2-1 or something to that effect.
That is all that happens when the camera is plugged in. On my old
system when /sbin/hotplug was used, the usb scripts properly found the
/proc/bus/usb entry and my usbcam script properly set the permissions
so I could use the camera as my normal user. I have always used gphoto
and it seems to communicate to the camera through this /proc entry.
Now that /sbin/udevsend is used, nothing is happening. My usb hotplug
scripts are never called and udevinfo prints nothing about a camera
device. So I have a few questions about how to best  solve this.

Why was the switch made to use /sbin/udevsend? On my old system using
/sbin/hotplug, buth udev and hotplug worked great. Now hotplug does
not seem to work.

Can I switch back to /sbin/hotplug? Will there be any adverse effects? 


Is there a better way to get my digital camera to work than using
hotplug with a usbcam script? Perhaps a udev rule (The camera never
used a /dev entry in the past at all, so I don't know if this is
possible) ?

I read the udevsend manpage and it seems that udevsend is supposed to
be called by hotplug, but that doesn't seem to be happening. Is there
a way to get use /sbin/hotplug and have it call udevsend or even have
/sbin/udevsend call /sbin/hotplug so both tools can work?

Thanks,
Kareem
 


Kareem,

Let me point you to this series of messages in the archives:

http://archives.linuxfromscratch.org/mail-archives/lfs-support/2005-July/027542.html

This message and the next three or four replies to it may answer your 
questions.


Dan
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: udevsend and hotplug

2005-07-11 Thread steve crosby
On 7/12/05, kareemy [EMAIL PROTECTED] wrote:
 On 7/11/05, Dan McGhee [EMAIL PROTECTED] wrote:
  kareemy wrote:
 

snip

 
 Thank you. I have read that. It provided some insight as to how
 udev+hotplug are supposed to work but didn't quite solve my issue. In
 the meantime I found two possible solutions that have worked for me.
 
 1) Keep /sbin/udevsend as the hotplug handler. Compile the
 run_directory extras in the udev source code by issuing the command
 make EXTRAS=extras/run_directory. This will generate a
 udev_run_hotplugd binary. Copy that binary to /sbin and add the
 following rule to 50-udev.rules:
 
 ENV{UDEVD_EVENT}==1, RUN+=/sbin/udev_run_hotplugd
 

This is the correct option - from udev-059 onwards, the hotplug
handling is being done differently, with the udev rules being expanded
to allow calling of hotplug scripts from the udev rules file. It will
take a while to get a properly grip on the new functionality.

Ideally, the hotplug scripts will go away entirely, and be replaced by
udev rules that can call modprobe directly, etc. - that will take some
time however.

-- -
Steve Crosby
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page