Handle spaces.

This commit is contained in:
fewtarius 2023-01-19 06:32:50 -05:00
parent 58098cc889
commit 23574e8871
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A

View file

@ -79,9 +79,10 @@ device_powersave() {
PSMODE=on
;;
esac
for DEVICE in $(find /sys/devices -name control 2>/dev/null)
find /sys/devices -name control -print0 | \
while read -r -d '' DEVICE
do
echo ${PSMODE} >${DEVICE} 2>/dev/null
echo ${PSMODE} >"${DEVICE}" 2>/dev/null
done
}