Monitoring attributes of the device

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

 



Hi,

      I wanted to know is it possible to write a rule for the udev which will run a program when the attribute of the device changes. For example if the ethernet plug is removed, the attribute "carriers" of net class will change from 1 to 0. To track this change i wrote the following rule in the /etc/udev/rules.d/70-persistent-net.rules file

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{carrier}=="0", ATTR{address}=="00:0c:29:27:a2:95", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", RUN+="/bin/up.sh"

 up.sh will echo some thing in to the text file  in my home directory.
But the up.sh is not getting executed.  Thanks in advance.

Regards,
Shashank K S

http://www.mindtree.com/email/disclaimer.html
--
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