Re: Ordering hotplug scripts vs. udev device node creation

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 23 October 2006 23:26, Aaron Cohen wrote:
> Adding a USB device seems to work correctly (more or less, my script
> is invoked a few too many times but I think I can figure out how to
> adjust my rule) using this.  I'm having trouble now with removal
> though.  By the time my script runs the device file has been removed
> by udev and I can't look it up through udevinfo any longer.  I need to
> know what the name of the device file was so I can tell gpsd to stop
> monitoring it.
>
> Any ideas?

udev sets DEVNAME and DEVLINKS environment before calling RUN program. You can 
either pass them directly like

RUN+="/your/program env{DEVNAME} env{DEVLINKS}"

or your program can get them from environment. It unfortunately seems to be 
not documented.

HTH

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFPX5YR6LMutpd94wRAsDrAJ92kOTrofNo3kg/5xW0C6bzm5TlDACg0/NG
K4R+tBQzCHJSN+XW5WBPghE=
=ZIet
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux