add systemd service for changing ownership of huawei-wmi files

This commit is contained in:
2022-06-13 20:14:56 +03:00
parent f02400b780
commit 4b06e84051
2 changed files with 20 additions and 0 deletions

10
bin/chown-huawei-wmi.sh Executable file
View File

@@ -0,0 +1,10 @@
#! /bin/bash
readonly WMI=/sys/devices/platform/huawei-wmi
echo "started"
echo "$(/bin/whoami)"
chmod g+w "$WMI/leds/platform::micmute/brightness"
chown root:huawei-wmi "$WMI/leds/platform::micmute/brightness"

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Huawei WMI Privilege (other)
After=sys-devices-platform-huawei\x2dwmi.device
[Service]
Type=oneshot
ExecStart=/home/daniil/dotfiles/bin/chown-huawei-wmi.sh
[Install]
WantedBy=sys-devices-platform-huawei\x2dwmi.device