[systemd-devel] udev rules environment variable
Martin Pitt
martin.pitt at ubuntu.com
Tue Dec 17 04:54:34 PST 2013
Robert Milasan [2013-12-17 12:44 +0100]:
> I have this rule as a test, but doesn't do squat (meaning it doesnt
> work) :)
>
> ACTION=="add", SUBSYSTEM=="net", KERNEL=="?*", ENV{test_device}="1"
>
> ACTION=="remove", SUBSYSTEM=="net", KERNEL=="?*", ENV{test_device}=="1", RUN+="/bin/sh -c 'echo test_device > /tmp/test_device.log'"
Drop the KERNEL== bits. Network devices don't have a /dev/... device
node in Linux, so KERNEL will never be set for those.
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
More information about the systemd-devel
mailing list