A few updates to make code work across x86_64 and aarch64.
This commit is contained in:
@@ -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]*$//')
|
||||
|
||||
Reference in New Issue
Block a user