diff options
| author | Jonathan Bauer | 2016-06-08 11:30:44 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2016-06-08 11:30:44 +0200 |
| commit | 2777db81fb1ae36ba706d8a44c5e0918f3428d1d (patch) | |
| tree | cfdb94d5a27e4e6dc2584b5e566911b6d9ab5200 /remote/modules/hardware-stats/data/opt | |
| parent | [doc] documented new config variables (diff) | |
| parent | [kernel-vanilla] 4.4.12 (diff) | |
| download | tm-scripts-2777db81fb1ae36ba706d8a44c5e0918f3428d1d.tar.gz tm-scripts-2777db81fb1ae36ba706d8a44c5e0918f3428d1d.tar.xz tm-scripts-2777db81fb1ae36ba706d8a44c5e0918f3428d1d.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/modules/hardware-stats/data/opt')
| -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 eee38a7b..94c2094f 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 @@ -40,7 +40,7 @@ fi MAC=${BOOTIF:3} # 2) Get machine UUID, with fallback to MAC address if it fails for some reason -UUID=$(dmidecode -s system-uuid) +UUID=$(dmidecode -s system-uuid | head -n 1) if [ "${#UUID}" -ne "36" ]; then echo "Determined UUID (${UUID}) has not expected length of 36, falling back to MAC..." UUID="000000000000000-$BOOTIF" @@ -143,7 +143,7 @@ fi # A) Read system model and manufacturer dmidec() { - local LMODEL=$(dmidecode "$@" 2>/dev/null | sed 's/\s\s*/ /g;s/^ //;s/ $//') + local LMODEL=$(dmidecode "$@" 2>/dev/null | grep -v '^Invalid' | sed 's/\s\s*/ /g;s/^ //;s/ $//') case "$LMODEL" in ""|*"Product Name"*|*"be filled"*|"unknown"|*"product name"*) LMODEL="Unknown" |
