Skip to content

Commit

Permalink
init.sh: make grep for CPU model name more robust (#298)
Browse files Browse the repository at this point in the history
On my VM (though not within Docker) the previous grep matched for the BIOS name too:

```
# lscpu | grep 'Model name:'
Model name:                           AMD EPYC 7282 16-Core Processor
BIOS Model name:                      pc-i440fx-5.2  CPU @ 2.0GHz
```
  • Loading branch information
schildbach authored Sep 12, 2024
1 parent 3c91b3c commit fbfb50c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [[ "${DEBUG,,}" == "true" ]]; then
echo "
System info:
OS: $(uname -a)
CPU: $(lscpu | grep 'Model name:' | sed 's/Model name:[[:space:]]*//g')
CPU: $(lscpu | grep '^Model name:' | sed 's/Model name:[[:space:]]*//g')
RAM: $(awk '/MemAvailable/ {printf( "%d\n", $2 / 1024000 )}' /proc/meminfo)GB/$(awk '/MemTotal/ {printf( "%d\n", $2 / 1024000 )}' /proc/meminfo)GB
HDD: $(df -h | awk '$NF=="/"{printf "%dGB/%dGB (%s used)\n", $3,$2,$5}')"
printf "\\nCurrent version:\\n%s" "${VERSION}"
Expand Down

0 comments on commit fbfb50c

Please sign in to comment.