A few updates to make code work across x86_64 and aarch64.

This commit is contained in:
Storm Dragon
2025-07-13 16:42:29 -04:00
parent 23de8d037b
commit b95ab42026
2 changed files with 6 additions and 5 deletions

View File

@@ -9,14 +9,16 @@ check_usb_port() {
if [[ -f "$speed_file" ]]; then
speed=$(cat "$speed_file")
if [[ $speed -lt 1000 ]]; then
spd-say -Cw "Warning. USB 2.0 detected. Please power off the Pi and move the USB drive to a USB 3 port for better performance."
spd-say -Cw "Warning. USB 2.0 detected. Please power off the system and move the USB drive to a USB 3 port for better performance."
fi
fi
}
# set performance
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
# set performance (if scaling governor exists)
if [[ -d /sys/devices/system/cpu/cpu0/cpufreq ]]; then
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor 2>/dev/null || true
fi
# Find the USB bus speed for the boot drive
device=$(findmnt / -o SOURCE -n | sed 's/[0-9]*$//')