aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-05-21 13:51:10 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-05-21 13:51:10 -0400
commit8019a9f4e7d50026e659dd781bdb86b47970c5fa (patch)
tree0102448c6fdce6b03e1859601f83b14236806911
parent7762816995a43678da79430a13a06b64a99fd55a (diff)
downloadkvm-manager-8019a9f4e7d50026e659dd781bdb86b47970c5fa.tar.gz
kvm-manager-8019a9f4e7d50026e659dd781bdb86b47970c5fa.tar.bz2
kvm --version has multiple lines of output these days
-rwxr-xr-xkvm-manager2
1 files changed, 1 insertions, 1 deletions
diff --git a/kvm-manager b/kvm-manager
index d44de70..4c48e8e 100755
--- a/kvm-manager
+++ b/kvm-manager
@@ -51,7 +51,7 @@ BRIDGE="${BRIDGE:-br0}"
OWNERGROUP=$(groups "$OWNER" | cut -f1 -d\ )
OWNERHOME=$(getent passwd "$OWNER" | cut -f6 -d: )
-kvm_version=$(kvm --version | sed -E 's/QEMU emulator version ([0-9.]+).*/\1/' | tr -d '.')
+kvm_version=$(kvm --version | head -n1 | sed -E 's/QEMU emulator version ([0-9.]+).*/\1/' | tr -d '.')
# Disks can be HDA, HDB, HDC, etc. For each disk, we want to detect the
# corresponding environment variables for disk read/write restrictions