mirror of
https://github.com/KDE/kde-linux.git
synced 2026-07-30 16:56:46 -04:00
Revert erroneous commits
Made a mistake when trying to manually rebase the fork.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user