From c63738989201f5349bec488920f4e90325b56aa7 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 27 Dec 2021 19:58:42 -0500 Subject: [PATCH] local_facts.fact: Explain null byte cleanup PR #3086 --- scripts/local_facts.fact | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 16bf0104a..553896f73 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -101,6 +101,8 @@ tmp=$(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!) +# tr -d '\0' ...strips out its null byte, for cleaner output (PR #3086) + tmp=$(tr -d '\0' < /proc/device-tree/model) && DEVICETREE_MODEL=$tmp