From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SIuto-0005iu-Vd for garchives@archives.gentoo.org; Sat, 14 Apr 2012 04:47:49 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B3D01E0D32; Sat, 14 Apr 2012 04:47:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7EAAAE0D32 for ; Sat, 14 Apr 2012 04:47:40 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C9B311B401D for ; Sat, 14 Apr 2012 04:47:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E32A8E5402 for ; Sat, 14 Apr 2012 04:47:37 +0000 (UTC) From: "Richard Yao" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Richard Yao" Message-ID: <1334378795.aa49399a69f165abd2ada35b37f5945aeec22689.ryao@gentoo> Subject: [gentoo-commits] proj/kvm-tools:master commit in: / X-VCS-Repository: proj/kvm-tools X-VCS-Files: kvm-init-script qtap-manipulate X-VCS-Directories: / X-VCS-Committer: ryao X-VCS-Committer-Name: Richard Yao X-VCS-Revision: aa49399a69f165abd2ada35b37f5945aeec22689 X-VCS-Branch: master Date: Sat, 14 Apr 2012 04:47:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: fe9cc405-044d-4459-a0fe-4e50bdf1176d X-Archives-Hash: 7ba3cc9a94606c9a60e03eba1622c266 commit: aa49399a69f165abd2ada35b37f5945aeec22689 Author: Richard Yao cs stonybrook edu> AuthorDate: Sat Apr 14 04:46:35 2012 +0000 Commit: Richard Yao cs stonybrook edu> CommitDate: Sat Apr 14 04:46:35 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/kvm-tools.git= ;a=3Dcommit;h=3Daa49399a Minor fixes for residual issues --- kvm-init-script | 9 +++++---- qtap-manipulate | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/kvm-init-script b/kvm-init-script index 87d5a48..cec0ed6 100644 --- a/kvm-init-script +++ b/kvm-init-script @@ -13,8 +13,9 @@ DROP_USER=3D${DROP_USER:-nobody} MEMORY=3D${MEMORY:-512M} TIMEOUT=3D${TIMEOUT:-300} SMP=3D${SMP:-1} +export KVM_USER=3D${KVM_USER:-"root"} =20 -opts=3D"reboot" +extra_commands=3D"reboot" =20 depend() { need net.br0 @@ -22,16 +23,16 @@ depend() { =20 send_command() { local command=3D"socat -u - UNIX-CONNECT:${MONITOR}" - which nc6 2>&1 > /dev/null && command=3D"nc6 -U ${MONITOR} --send-only" + which nc6 2> /dev/null > /dev/null && command=3D"nc6 -U ${MONITOR} --se= nd-only" echo "$@" | ${command} >/dev/null 2>&1 } =20 sanity_check() { - if [ "${VMNAME}" =3D "${SVCNAME}" ]; then + if [ "${VMNAME}" !=3D "${SVCNAME}" ]; then eerror "You have to create an init script for each vm:" eerror " ln -s vm /etc/init.d/vm.vmname" return 1 - elif [ ! -f "${DISKIMAGE}" ]; then + elif [ ! -f "${DISKIMAGE}" -a ! -b "${DISKIMAGE}" ]; then eerror "couldn't find \$DISKIMAGE '$DISKIMAGE'" return 1; fi diff --git a/qtap-manipulate b/qtap-manipulate index b75c5ef..0c92633 100755 --- a/qtap-manipulate +++ b/qtap-manipulate @@ -1,7 +1,7 @@ #!/bin/sh [ -z "$1" ] || ( [ "$1" !=3D "create" ] && [ -z "$2" ] ) && { echo "inva= lid usage, require create [device] || |destroy device"; exit 1; } =20 -#KVM_USER=3D"kvm-envs" +KVM_USER=3D${KVM_USER:-"root"} =20 has() { local desired=3D$1 x