mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #3086 from holta/local_facts.fact-cleaner-output
Cleaner output for local_facts.fact on Raspberry Pi & similar, by hiding the null byte in /proc/device-tree/model
This commit is contained in:
commit
2a754a3c78
1 changed files with 2 additions and 2 deletions
|
@ -95,13 +95,13 @@ tmp=$(git rev-parse --verify HEAD) &&
|
||||||
#tmp=$(cat /proc/device-tree/mfg-data/MN) &&
|
#tmp=$(cat /proc/device-tree/mfg-data/MN) &&
|
||||||
# XO_MODEL=$tmp
|
# 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
|
RPI_MODEL=$tmp
|
||||||
|
|
||||||
# /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!)
|
||||||
|
|
||||||
tmp=$(cat /proc/device-tree/model) &&
|
tmp=$(tr -d '\0' < /proc/device-tree/model) &&
|
||||||
DEVICETREE_MODEL=$tmp
|
DEVICETREE_MODEL=$tmp
|
||||||
|
|
||||||
tmp=$(ansible --version) &&
|
tmp=$(ansible --version) &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue