[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hotplug script before udev



On 3/9/06, Florian Kulzer <florian@molphys.leidenuniv.nl> wrote:
> David Berg wrote:
>
> [...]
>
> > Correct me if I'm mistaken, being that PROGRAM is a _key_ it is run
> > before the device is created so that it can be used to determine which
> > name should be used.  Since it is run before the device is created, it
> > can't be used to mount a filesystem on that device.
>
> I think the main problem is that I did not realize that you are running
> Sarge. In Sid hotplug is completely replaced by udev, and I think that
> this is also what will happen when Etch is released. My information
> about the PROGRAM key is from the manual of udev 0.086. Maybe this is
> not implemented yet for the udev of Sarge. Can you find any information
> about the intended interaction between hotplug and the older udev in
> /usr/share/doc/udev/README.Debian.gz?

dberg@chip:/etc/hotplug.d/default$ ls -l 10*
lrwxrwxrwx  1 root root 14 2006-02-17 08:24 10-udev.hotplug -> /sbin/udevsend
lrwxrwxrwx  1 root root   24 2006-02-17 08:24 20-hal.hotplug ->
/usr/lib/hal/hal.hotplug
-rwxr-xr-x  1 root root 2920 2006-03-08 19:37 default.hotplug

From udevd/udevsend manpage:
 "udevd receives the events from udevsend"

So udev is called before the rest of the hotplug scripts are executed
but apparently it doesn't finish fast enough.  udevsend must return
before the device is created because /sbin/hotplug doesn't put the
scripts it calls in the background:

#/sbin/hotplug
DIR="/etc/hotplug.d"

for I in "${DIR}/$1/"*.hotplug "${DIR}/"default/*.hotplug ; do
        test -x "$I" && "$I" "$1"

But again none of my mesg commands are making it to the logs while
hotplug's usbagent reports that "photodl: loaded successfully".  To me
this seems like the primary problem.  If my sleep command were
actually executed, I should be able to make it wait a sufficient
amount of time for the devices to come up.  Perhaps not as elegant as
it could be but I'm quite ready to be done with this little task and
move on to something else.

--Dave

Reply to: