Prevent printing error message during device detection

This commit is contained in:
Taylor Helsper 2024-08-04 23:59:33 -05:00
parent 98a6743146
commit 487eaf2d6f

View File

@ -15,7 +15,10 @@ IS_32_BIT=0
IS_64_BIT=0
DEVICE_TYPE="unknown"
DEVICE_ARCH=$(uname -m) # Examples: armv7l aarch64 x86_64
MODEL=$(tr -d '\0' < /proc/device-tree/model) || MODEL="unknown"
MODEL="unknown"
if [ -f /proc/device-tree/model ]; then
MODEL=$(tr -d '\0' < /proc/device-tree/model) || MODEL="unknown"
fi
DEBIAN_VERSION=$(lsb_release -c -s) || DEBIAN_VERSION="unknown"
uname -a | grep amd64 && IS_X86=1 && IS_64_BIT=1 || true
if [[ $MODEL == *"Rock64"* ]]; then