[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:
> Andrew Sackville-West wrote:
> > On Thu, 9 Mar 2006 08:13:46 -0600 "David Berg" <drberg1000@gmail.com>
> > wrote:
> >
> >
> >> 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.
>
> [...]
>
> > just a quick thought. is it possible that udev doesn't actually
> > process everything on the one line as suggested by Florian? Maybe it
> > only processes one item at a time until it satisfies the rule and
> > thus, your PROGRAM at the end of the line doesn't ever actually run
> > as the other keys satisfy and generate the device. Also, its my
> > understanding that the PROGRAM is just like any other key and udev is
> > expecting it to return a value to help udev determine what devices to
> > create.
>
> Uh-oh, I just checked again and I was indeed wrong about the PROGRAM
> key. I mixed it up with the RUN key which unfortunately does not seem to
> be implemented in udev 0.056. Sorry for adding to the confusion...


The docs say that all of the keys have to match so the PROGRAM would
get run though it might not if the whole line isn't parsed in advance.
 Either way it would be run before the /dev entry is created and thus
mount wouldn't be able to access the filesystem.

The RUN assignment would be great, but the same should be able to be
accomplished within the hotplug scripts.  What baffles me is that none
of the mesg commands make it to the logs.  If those don't get there I
can't really be surprised that nothing gets mounted.  So again, my
question is why would mesg commands not get logged, yet hotplug
reports that photodl was sucessfully loaded.

gnome-volume-manager (which sees the device insertion and acts on it
properly) says that it listens to d-bus and hal for events.  I can't
seem to find documentation on how to use hal this.  From the
description of d-bus it doesn't seem like a program that would allow
calling a script.  Although, since gnome-volume-manager is a daemon,
it may not be the best place to look for examples.

Perhaps I should just use gnome-volume-manager and be done.  It seems
like so much bloat for what I want to do though.

--Dave

Reply to: