meta data for this page
  •  

This is an old revision of the document!


Getting info

Get Telit modem serial number

udevadm info -q property -n /dev/ttyACM1 | grep ID_SERIAL_SHORT
ID_SERIAL_SHORT=356136070718830

Debug

/etc/udev/udev.conf
udev_log="debug"

Rules

Executing commands

SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="/usr/bin/true"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="/usr/bin/true"
SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", ATTRS{name}=="edt-ft53*", SYMLINK+="input/touchscreen", OPTIONS+="link_priority=100"
SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", ATTRS{name}=="ti-tsc",    SYMLINK+="input/touchscreen", OPTIONS+="link_priority=0"

link_priority: higher has higher priority

Triggering systemd

SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", TAG+="systemd", ENV{SYSTEMD_WANTS}="powersaving.service"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", TAG+="systemd", ENV{SYSTEMD_WANTS}="powersaving.service"
SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}="printer.target"