From b2b56668727f5a7b3043e00b3c5e14681044d6d0 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 31 Dec 2021 21:50:51 -0500 Subject: [PATCH] local_facts.fact: $RPI_MODEL should be "none" when not a Raspberry Pi --- scripts/local_facts.fact | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 80b6a7068..164efbb89 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -95,8 +95,8 @@ tmp=$(git rev-parse --verify HEAD) && #tmp=$(cat /proc/device-tree/mfg-data/MN) && # XO_MODEL=$tmp -tmp=$(grep -ai raspberry /proc/device-tree/model | tr -d '\0') && - RPI_MODEL=$tmp +grep -iq raspberry /proc/device-tree/model && + RPI_MODEL=$(grep -ai raspberry /proc/device-tree/model | tr -d '\0') # /proc/device-tree/model e.g. 'Parallels ARM Virtual Machine' identical to... # /sys/firmware/devicetree/base/model (also true on RPi hardware!)