diff --git a/bin/chown-huawei-wmi.sh b/bin/chown-huawei-wmi.sh new file mode 100755 index 0000000..b29d827 --- /dev/null +++ b/bin/chown-huawei-wmi.sh @@ -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" diff --git a/systemd/huawei-wmi-owner.service b/systemd/huawei-wmi-owner.service new file mode 100644 index 0000000..270d58c --- /dev/null +++ b/systemd/huawei-wmi-owner.service @@ -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