1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00

local_facts.fact: Clean null byte from /proc/device-tree/model

This commit is contained in:
root 2021-12-26 17:14:43 -05:00
parent e1de8eb19a
commit 419ecbea41

View file

@ -95,13 +95,13 @@ 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) &&
tmp=$(grep -ai raspberry /proc/device-tree/model | tr -d '\0') &&
RPI_MODEL=$tmp
# /proc/device-tree/model e.g. 'Parallels ARM Virtual Machine' identical to...
# /sys/firmware/devicetree/base/model (also true on RPi hardware!)
tmp=$(cat /proc/device-tree/model) &&
tmp=$(tr -d '\0' < /proc/device-tree/model) &&
DEVICETREE_MODEL=$tmp
tmp=$(ansible --version) &&