main/postmarketos-base: change permission on tm2-touchkey leds (MR 2380)

Allow users in group "input" to control the tm2-touchkey leds.

Additionally correcting the udev rule for disabling the tm2-touchkey leds by default.

[ci:skip-build] already built successfully in CI
This commit is contained in:
Jakob Hauser 2021-07-24 12:24:49 +02:00 committed by Clayton Craft
parent 13af7396e9
commit 4baa805b41
No known key found for this signature in database
GPG key ID: 7A3461CA187CEA54
2 changed files with 8 additions and 4 deletions

View file

@ -1,5 +1,5 @@
pkgname=postmarketos-base
pkgver=13
pkgver=14
pkgrel=0
pkgdesc="Meta package for minimal postmarketOS base"
url="https://postmarketos.org"
@ -107,7 +107,7 @@ e4576c58c35f80bedddb1e89e186f37d31a186d3e9eb046581b8c5d7b7d435e18924539e851d3e67
6723ae5035b959ed8c0c5ee490ce2e1abc9fe89e6c7348533e488b78b2a15593df406d6691f6b854ed71633960257a6aa5c65aa01db189732e26ba8e15ef23b8 rootfs-etc-os-release
5fd6dd7f9941e975a6ce559924eb252606943276dc09455bbeb05ff718ecd28f20a08eee8e04ca580e5af71d4c944c256ec04f07b07286394f5dfedfa59273e7 rootfs-etc-init.d-deferred-initcalls
f5cc0f1265955d2646e5f099dd4b5d4c287945bfc18c16044db57670d456f55c678fc11cc59e6dab3fa340832ce869d516302a3a35c13518539ed0cedca51819 rootfs-etc-init.d-swapfile
5f5086e84389323673284a9734cdd14bffc5277a484c481f7d95d42d8fdeb7a098eb9b62f894f3e12533fe7b1dd47859e77313d816a14591d4e07a9c7531ad16 rootfs-lib-udev-rules.d-20-tm2-touchkey-leds.rules
de4d8f258cb2ce654be15abe0188caa6ca9cc163fd45350f2025e7e9d043878e3f1202ef9033b1b15d7e18c4b40c3b19db387ee050a3baf03c4bd4293f4721e3 rootfs-lib-udev-rules.d-20-tm2-touchkey-leds.rules
0b098828080055d3646ea54891cb0e1b578cbc30f5e16f7284f2814c08192f18079a38fb686d192715ae6a3d2cd6625d9e3cf99f234a6f0d94088bb0cb2ce43d rootfs-lib-udev-rules.d-50-firmware.rules
766aace60f7aea2515e03aec9f6d3215fcabcd81a235acb7b79bac1ae44e75c3087c541370fe1565a05a78f70a071fe20380b91e23e1fb48390b9df19354d008 rootfs-lib-udev-rules.d-95-rt5033-battery-refresh.rules
3ceeee37f558e7c95ad973692b6a437f997e6b46c3d1c2257ddfb1529a5633477373aa123c7f08164e818daae50acb203d151379f27ca11bd458809e6a0d4de7 rootfs-sbin-swapfile

View file

@ -1,3 +1,7 @@
# disable tm2-touchkey leds by default
# To change the default, copy the file to /etc/udev/rules.d, increase the file name number and change echo to 1.
ACTION=="add", KERNEL=="tm2-touchkey", RUN+="/bin/sh -c 'echo 0 > /sys/class/leds/tm2-touchkey/brightness'"
# To change the default, copy the file to /etc/udev/rules.d, increase the file name number and change brightness to 1.
ACTION=="add", SUBSYSTEM=="leds", KERNEL=="tm2-touchkey", ATTR{brightness}="0"
# allow users in group "input" to control the tm2-touchkey leds
ACTION=="add", SUBSYSTEM=="leds", KERNEL=="tm2-touchkey", RUN+="/bin/chgrp -R input /sys%p", RUN+="/bin/chmod -R g=u /sys%p"
ACTION=="change", SUBSYSTEM=="leds", KERNEL=="tm2-touchkey", ENV{TRIGGER}!="none", RUN+="/bin/chgrp -R input /sys%p", RUN+="/bin/chmod -R g=u /sys%p"