diff options
Diffstat (limited to 'remote/modules/hardware-stats/data')
| -rwxr-xr-x | remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats b/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats index f1538c1a..686bb444 100755 --- a/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats +++ b/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats @@ -49,7 +49,7 @@ if [ -z "$CPUCORES" ] || [ "$CPUCORES" = "0" ]; then fi # 5) CPU model name -CPUMODEL=$(grep -m1 '^model name\s*:' /proc/cpuinfo | sed 's/^model name\s*:\s*//') +CPUMODEL=$(grep -m1 '^model name\s*:' /proc/cpuinfo | sed 's/^model name\s*:\s*//;s/\s\s*/ /g;s/^ //;s/ $//') # 6) RAM RAM=$(grep '^MemTotal:' /proc/meminfo | awk '{print $2}') @@ -126,7 +126,7 @@ fi # A) Read system model and manufacturer dmidec() { - local MODEL=$(dmidecode "$@") + local MODEL=$(dmidecode "$@" | sed 's/\s\s*/ /g;s/^ //;s/ $//') case "$MODEL" in ""|*"Product Name"*|*"be filled"*|"unknown"|*"product name"*) MODEL="Unknown" |
