Revert erroneous commits

Made a mistake when trying to manually rebase the fork.
This commit is contained in:
Thomas Duckworth
2026-07-04 16:30:28 +10:00
parent 6920aa777e
commit f0474789fd

View File

@@ -9,13 +9,10 @@ set -e
INPUT_DEVICE_IDS=$(find /sys/bus/usb/drivers/usbhid -regex '.*\/[0-9:.-]+' -printf '%f\n' | cut --delimiter ":" --fields 1 | sort --unique)
set +e
for DEVICE_ID in $INPUT_DEVICE_IDS; do
if ! { DEVICE_PRETTY_NAME=$(cat "/sys/bus/usb/devices/${DEVICE_ID}/product"); } 2> /dev/null; then
DEVICE_PRETTY_NAME="Unknown"
fi
DEVICE_INFO_MSG="USB auto-suspend for device \"${DEVICE_PRETTY_NAME}\" (with ID ${DEVICE_ID})"
echo "Disabling ${DEVICE_INFO_MSG}"
if ! (echo "on" >| "/sys/bus/usb/devices/${DEVICE_ID}/power/control") 2> /dev/null; then
echo "Unable to disable ${DEVICE_INFO_MSG}"
fi
DEVICE_PRETTY_NAME=$(cat /sys/bus/usb/devices/$DEVICE_ID/product)
echo "Disabling USB auto-suspend for device \"$DEVICE_PRETTY_NAME\" (with ID $DEVICE_ID)"
echo "on" >| "/sys/bus/usb/devices/$DEVICE_ID/power/control";
done