Update static shebangs to flexible /usr/bin/env

* Also fixes static /bin/chmod executable call in UDEV rules
* Resolves #4166
This commit is contained in:
Chris M 2024-06-19 17:54:27 +10:00
parent 72507ea108
commit 15c3d8591c
4 changed files with 5 additions and 5 deletions

View file

@ -30,14 +30,14 @@ UDEV_HEADER+=${UDEV_LINE}'# Super I/O Access
ASUS_TUF_DEVICES=('blue' 'flags' 'green' 'mode' 'red' 'set' 'speed')
UDEV_HEADER+=${UDEV_LINE}'# ASUS TUF Laptops (faustus) #\n'${UDEV_LINE}
for DEV in ${ASUS_TUF_DEVICES[@]}; do
UDEV_HEADER+='ACTION=="add", SUBSYSTEM=="platform", KERNEL=="faustus", RUN+="/bin/chmod a+w /sys/bus/platform/devices/%k/kbbl/kbbl_'${DEV}'"\n'
UDEV_HEADER+='ACTION=="add", SUBSYSTEM=="platform", KERNEL=="faustus", RUN+="/usr/bin/env chmod a+w /sys/bus/platform/devices/%k/kbbl/kbbl_'${DEV}'"\n'
done
# asus-wmi rules
ASUS_WMI_DEVICES=('kbd_rgb_mode' 'brightness')
UDEV_HEADER+='\n'${UDEV_LINE}'# ASUS TUF Laptops (asus-wmi) #\n'${UDEV_LINE}
for DEV in ${ASUS_WMI_DEVICES[@]}; do
UDEV_HEADER+='ACTION=="add", SUBSYSTEM=="leds", KERNEL=="asus::kbd_backlight", RUN+="/bin/chmod a+w /sys%p/'${DEV}'"\n'
UDEV_HEADER+='ACTION=="add", SUBSYSTEM=="leds", KERNEL=="asus::kbd_backlight", RUN+="/usr/bin/env chmod a+w /sys%p/'${DEV}'"\n'
done
echo -e "$UDEV_HEADER" > "$UDEV_FILE"