#Trace all uevents to /tmp/udevtrace.log

SUBSYSTEM=="?*", RUN+="/bin/sh -c 'echo $env{ACTION}_%k_$env{SUBSYSTEM}_%s{vendor}_%s{device}_%s{modalias} >> /tmp/udevtrace.log'"


#Trace modem-related uevents to /tmp/udevtrace-modem.log

SUBSYSTEM=="usb", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_v%s{idVendor}_p%s{idProduct}_d%s{bcdDevice}_dc%s{bDeviceClass}_ic%s{bInterfaceClass}_in%s{bInterfaceNumber}_$env{DEVTYPE}_%s{manufacturer}_%s{product}_%s{serial}_%s{model} >> /tmp/udevtrace-modem.log'"
#SUBSYSTEM=="usb", RUN+="/bin/sh -c 'echo Same_entry_using_$attr_variables:_$env{SUBSYSTEM}_v$attr{idVendor}_p$attr{idProduct}_d$attr{bcdDevice}_dc$attr{bDeviceClass}_ic$attr{bInterfaceClass}_$env{DEVTYPE}_$attr{manufacturer}_$attr{product}_$attr{model} >> /tmp/udevtrace-modem.log'"
SUBSYSTEM=="pcmcia", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_v%s{idVendor}_p%s{idProduct}_d%s{bcdDevice}_dc%s{bDeviceClass}_ic%s{bInterfaceClass}_in%s{bInterfaceNumber}_%s{manufacturer}_%s{product}_%s{model} >> /tmp/udevtrace-modem.log'"
SUBSYSTEM=="tty", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_%k >> /tmp/udevtrace-modem.log'"
KERNEL=="hso", SUBSYSTEM=="module", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_%k >> /tmp/udevtrace-modem.log'"
KERNEL=="ipw", SUBSYSTEM=="module", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_%k >> /tmp/udevtrace-modem.log'"
KERNEL=="ipwireless", SUBSYSTEM=="module", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_%k >> /tmp/udevtrace-modem.log'"
KERNEL=="motomodem", SUBSYSTEM=="module", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_%k >> /tmp/udevtrace-modem.log'"
KERNEL=="nozomi", SUBSYSTEM=="module", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_%k >> /tmp/udevtrace-modem.log'"
KERNEL=="option", SUBSYSTEM=="module", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_%k >> /tmp/udevtrace-modem.log'"
KERNEL=="sierra", SUBSYSTEM=="module", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_%k >> /tmp/udevtrace-modem.log'"
KERNEL=="usbserial", SUBSYSTEM=="module", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_%k >> /tmp/udevtrace-modem.log'"
KERNEL=="serial_cs", SUBSYSTEM=="module", RUN+="/bin/sh -c 'echo $env{SUBSYSTEM}_%k >> /tmp/udevtrace-modem.log'"

SUBSYSTEM=="module", PROGRAM="/bin/uname -r", RUN+="/bin/sh -c 'echo linux_version_%c, >> /tmp/udevtrace-modem.log'"

