summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-06-28 19:24:09 +0200
committerLennart Poettering <lennart@poettering.net>2011-06-28 19:25:08 +0200
commit4091baaaf421c8199430bceae0485044b74754bd (patch)
treee3ac4a7c12117d1dcceeedca2b3f067ab035d7ae
parentbbd4388153bde7b7fdb39ce5c88dd92f7b8a4d2d (diff)
udev: dynamically generate seat where applicable from ID_PATH
-rw-r--r--src/71-seat.rules7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/71-seat.rules b/src/71-seat.rules
index c13bf08d08..636cafd394 100644
--- a/src/71-seat.rules
+++ b/src/71-seat.rules
@@ -15,7 +15,10 @@ SUBSYSTEM=="usb", ATTR{bDeviceClass}=="09", TAG+="seat"
SUBSYSTEM=="usb", ATTR{idVendor}=="2230", ATTR{idProduct}=="0001", ENV{ID_AUTOSEAT}="1"
IMPORT{parent}="ID_SEAT"
-ENV{ID_AUTOSEAT}=="1", ENV{ID_SEAT}=="", ENV{ID_SEAT}="seat-foo"
-ENV{ID_SEAT}!="", TAG+="seat-foo"
+
+ENV{ID_AUTOSEAT}=="1", ENV{ID_SEAT}=="", ENV{ID_PATH}=="", IMPORT{program}="path_id %p"
+ENV{ID_AUTOSEAT}=="1", ENV{ID_SEAT}=="", ENV{ID_PATH}!="", ENV{ID_SEAT}="seat-$env{ID_PATH}"
+
+ENV{ID_SEAT}!="", TAG+="$env{ID_SEAT}"
LABEL="seat_end"