From 8008ce1e2a28aa20f766fdfb3060d76a3d1409ac Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 7 Jun 2016 11:24:37 +0200 Subject: [kdm-bwlp] Fix warning about VM store when using dnbd3 --- .../hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats | 4 ++-- .../data/etc/systemd/system/kdm-hwinfo-warnings.service | 2 +- .../data/opt/openslx/scripts/systemd-kdm_hwinfo_warnings | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'remote') 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" diff --git a/remote/modules/kdm-theme-bwlp/data/etc/systemd/system/kdm-hwinfo-warnings.service b/remote/modules/kdm-theme-bwlp/data/etc/systemd/system/kdm-hwinfo-warnings.service index b8139a97..39f101c8 100644 --- a/remote/modules/kdm-theme-bwlp/data/etc/systemd/system/kdm-hwinfo-warnings.service +++ b/remote/modules/kdm-theme-bwlp/data/etc/systemd/system/kdm-hwinfo-warnings.service @@ -1,6 +1,6 @@ [Unit] Description=Patch warnings into KDM theme -After=hardware-stats.service +After=hardware-stats.service mount-vm-store.service Before=kdm.service [Service] diff --git a/remote/modules/kdm-theme-bwlp/data/opt/openslx/scripts/systemd-kdm_hwinfo_warnings b/remote/modules/kdm-theme-bwlp/data/opt/openslx/scripts/systemd-kdm_hwinfo_warnings index b542fabb..8b37de80 100755 --- a/remote/modules/kdm-theme-bwlp/data/opt/openslx/scripts/systemd-kdm_hwinfo_warnings +++ b/remote/modules/kdm-theme-bwlp/data/opt/openslx/scripts/systemd-kdm_hwinfo_warnings @@ -45,7 +45,7 @@ build_replacement_xml() { add_replace_xml "000000" "* Die ID44-Partition ist sehr klein. VM-Sitzungen könnten nach einiger Zeit aus Speichermangel abstürzen." CONTACT_RZ=fjeden fi - if ! awk '{print $2}' /proc/mounts | grep -q '^/mnt/vmstore$'; then + if ! systemctl status mount-vm-store >/dev/null; then add_replace_xml "ff0000" "* Der VM-Store konnte nicht eingehängt werden. VMs können nicht gestartet werden." add_replace_xml "ff0000" " Versuchen Sie das Problem zu lösen, indem Sie den Computer neu starten." fi -- cgit v1.2.3-55-g7522