Re: rule skipped during boot

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

 



> >> > I have written a udev rule to run a script when a particular tty is created.
> >> > This tty (named ttyYY0) is created when i insert a device into the
> >> > SDIO slot in my laptop.
> >> > When inserting the device into a living system, ttyYY0 is created and
> >> > script is always run, but during boot time, with the device already in
> >> > the slot, script is not run. (although even when it fails i do see the
> >> > ttyYY0 in the file system).
> >> > My udev rule looks like this:
> >> > KERNEL=="ttyYY0", ACTION=="add", SUBSYSTEM=="tty", RUN+="my_script.sh"
> >> > udevd version is 141
> >> > Anyone can help with this issue?
> >>
> >> At bootup, all device events need to be re-triggered when userspace is
> >> ready to handle them. It's usually done with "udevadm trigger". That
> >> should catch your device, as it would be plugged in at that time.
> >
> > isn't the triggering suppose to be a system's build in capability
> > after udev got loaded? why and where should i, as a rule's writer,
> > invoke the udevadm trigger?
>
> The system needs to "coldplug", during bootup, when /dev is
> bootstrapped on tmpfs. That's usually done by "udevadm trigger". Al
> that is part of the system logic, and not built into udev itself. Udev
> provides only the mechanics, but does not execute it.
>

i must have missed something.
you say there are two options:
1 - ttyYY0 was created _before_ udev is up. in this case i guess that
all kernels come with a build in "udevadm trigger" in their bootstrap
image, so udev should be notified about the tty.
2 - ttyYY0 was created _after_ udev is up, in this case there should
be no problem.

either cases my script should have run, but it didn't.
where is the wrong assumption here?

thanks
Ron
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux