diff --git a/packages/sysutils/remote/lirc/udev.d/98-lircd.rules b/packages/sysutils/remote/lirc/udev.d/98-lircd.rules index 5a39bcf1b3..f57037ced7 100644 --- a/packages/sysutils/remote/lirc/udev.d/98-lircd.rules +++ b/packages/sysutils/remote/lirc/udev.d/98-lircd.rules @@ -54,8 +54,11 @@ ENV{ID_VENDOR_ID}=="0fe9", ENV{ID_MODEL_ID}=="9010", \ LABEL="end-usb" -ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="lircd@$name:$env{lircd_driver}:$env{lircd_conf}.service", RUN+="lircd_wakeup_enable" -# ACTION=="add", RUN+="/usr/bin/systemctl start lircd@$name:$env{lircd_driver}:$env{lircd_conf}.service", RUN+="lircd_wakeup_enable" -ACTION=="remove", RUN+="/usr/bin/systemctl stop lircd@$name:$env{lircd_driver}:$env{lircd_conf}.service" +ENV{lircd_driver}=="?*", ENV{lircd_conf}=="?*", ACTION=="add", \ + TAG+="systemd", ENV{SYSTEMD_WANTS}+="lircd@$name:$env{lircd_driver}:$env{lircd_conf}.service", \ + RUN+="lircd_wakeup_enable" + +ENV{lircd_driver}=="?*", ENV{lircd_conf}=="?*", ACTION=="remove", \ + RUN+="/usr/bin/systemctl stop lircd@$name:$env{lircd_driver}:$env{lircd_conf}.service" LABEL="end"