]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Fix systemd-backlight ignoring numbered kbd_backlight entries
authorWerner Sembach <wse@tuxedocomputers.com>
Fri, 19 Jan 2024 19:56:15 +0000 (20:56 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 22 Jan 2024 22:03:35 +0000 (22:03 +0000)
If there are name collisions in the leds subsystem, the 2nd device node with the
colliding name gets automatically renamed by appending _1, the third by
appending _2 and so on.

This wildcard change makes sure that systemd-backlight also catches these
renamed nodes for kbd_backlight entries.

rules.d/99-systemd.rules.in

index 33624f88a5ffe5a2586545405480e457ac88405f..df52415a8f24753997ace2bf24f3d410e5251c73 100644 (file)
@@ -73,7 +73,7 @@ ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="{{LIBEXECDIR}}/systemd-sysc
 # Pull in backlight save/restore for all backlight devices and
 # keyboard backlights
 SUBSYSTEM=="backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@backlight:$name.service"
-SUBSYSTEM=="leds", KERNEL=="*kbd_backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@leds:$name.service"
+SUBSYSTEM=="leds", KERNEL=="*kbd_backlight*", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@leds:$name.service"
 {% endif %}
 
 # Pull in rfkill save/restore for all rfkill devices