]> gitweb.fluxo.info Git - kvm-manager.git/commitdiff
kvm --version has multiple lines of output these days
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 21 May 2017 17:51:10 +0000 (13:51 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 21 May 2017 17:51:10 +0000 (13:51 -0400)
kvm-manager

index d44de70a08a3353891d5159ae42b6aabc528c50f..4c48e8e3c6bc2c42a17083a931c701dca00dcc53 100755 (executable)
@@ -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