add systemd service for changing ownership of huawei-wmi files
This commit is contained in:
10
bin/chown-huawei-wmi.sh
Executable file
10
bin/chown-huawei-wmi.sh
Executable 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"
|
||||||
10
systemd/huawei-wmi-owner.service
Normal file
10
systemd/huawei-wmi-owner.service
Normal 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
|
||||||
Reference in New Issue
Block a user