1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

local_facts.fact: Explain null byte cleanup PR #3086

This commit is contained in:
A Holt 2021-12-27 19:58:42 -05:00 committed by GitHub
parent 2a754a3c78
commit c637389892
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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