]> err.no Git - systemd/commitdiff
udev: dynamically generate seat where applicable from ID_PATH
authorLennart Poettering <lennart@poettering.net>
Tue, 28 Jun 2011 17:24:09 +0000 (19:24 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 28 Jun 2011 17:25:08 +0000 (19:25 +0200)
src/71-seat.rules

index c13bf08d08a6bb1b4e2d10f6bcf89d50e21d8ced..636cafd394be3cbd7ae9324de91dd5bcb2365881 100644 (file)
@@ -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"