added udev rule to rpi-rf-mod package to allow addons to have write (#2854)

access to these led nodes.
This commit is contained in:
Jens Maus 2024-02-12 17:12:57 +01:00 committed by GitHub
parent f05294e51d
commit 623ebd8d38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1,4 @@
# make sure all rpi-rf-mod led nodes in /sys are generated with permissions so that addons
# can access it (e.g. raspberrymatic)
SUBSYSTEM=="leds", ACTION=="add", KERNEL=="rpi_rf_mod:*", RUN+="/bin/chmod -R g=u,o=u /sys%p"
SUBSYSTEM=="leds", ACTION=="change", KERNEL=="rpi_rf_mod:*", ENV{TRIGGER}!="none", RUN+="/bin/chmod -R g=u,o=u /sys%p"

View File

@ -57,6 +57,7 @@ define RPI_RF_MOD_INSTALL_TARGET_CMDS
if [[ -n "$(RPI_RF_MOD_DTS_FILE_ALT)" ]]; then \
$(INSTALL) -D -m 0644 $(@D)/buildroot-external/package/rpi-rf-mod/dts/$(RPI_RF_MOD_DTS_FILE_ALT).dtbo $(BINARIES_DIR)/; \
fi
$(INSTALL) -D -m 644 $(RPI_RF_MOD_PKGDIR)/82-rpi-rf-mod-leds.rules $(TARGET_DIR)/lib/udev/rules.d/
endef
$(eval $(generic-package))