summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2016-03-23 18:21:55 -0700
committerBrian Dolbec <dolsen@gentoo.org>2016-03-23 18:21:55 -0700
commit48dde09aa754cfaab6ac506937838afbb1dd518a (patch)
tree603d1d790753d9ca3162f68174340d865a4e60d8
parentBegin conversion to a normal source repo (diff)
downloadkvm-tools-source.tar.gz
kvm-tools-source.tar.bz2
kvm-tools-source.zip
Convert the repo to a source tree0.3.0source
-rw-r--r--qemu-init-scripts/qemu-conf.example (renamed from app-emulation/qemu-init-scripts/files/qemu-conf.example)0
-rwxr-xr-xqemu-init-scripts/qemu-init-script (renamed from app-emulation/qemu-init-scripts/files/qemu-init-script)3
-rwxr-xr-xqemu-init-scripts/qtap-manipulate (renamed from app-emulation/qemu-init-scripts/files/qtap-manipulate)2
3 files changed, 3 insertions, 2 deletions
diff --git a/app-emulation/qemu-init-scripts/files/qemu-conf.example b/qemu-init-scripts/qemu-conf.example
index 4911597..4911597 100644
--- a/app-emulation/qemu-init-scripts/files/qemu-conf.example
+++ b/qemu-init-scripts/qemu-conf.example
diff --git a/app-emulation/qemu-init-scripts/files/qemu-init-script b/qemu-init-scripts/qemu-init-script
index 937ddfe..2d3ce95 100755
--- a/app-emulation/qemu-init-scripts/files/qemu-init-script
+++ b/qemu-init-scripts/qemu-init-script
@@ -139,10 +139,11 @@ start() {
local NIC_COMMAND=( -net "nic,model=${NIC_MODEL:-virtio},macaddr=${MACADDR}" -net )
if [ "${NIC_TYPE}" = "br" ]; then
- ebegin "creating qtap ${QTAP:-(auto allocating one)}"
if [ -n "$QTAP" ]; then
+ ebegin "using specified QTAP: ${QTAP}"
qtap-manipulate create_specific "${QTAP}" -u "${DROP_USER}"
else
+ ebegin "creating qtap ${QTAP:-(auto allocating one)}"
QTAP=$(qtap-manipulate create -u "${DROP_USER}")
if [ 0 != $? ]; then
eerror "failed to create qtap interface"
diff --git a/app-emulation/qemu-init-scripts/files/qtap-manipulate b/qemu-init-scripts/qtap-manipulate
index 53ab346..516e1ca 100755
--- a/app-emulation/qemu-init-scripts/files/qtap-manipulate
+++ b/qemu-init-scripts/qtap-manipulate
@@ -14,7 +14,7 @@ has() {
}
find_available_node() {
- local val=$(ip addr | grep -i '.*: qtap' | cut -d: -f2)
+ local val=$(ip addr | grep -i '.*: qtap' | cut -d: -f2 | cut -d@ -f1)
local pos=0
while has qtap${pos} ${val##*()}; do
pos=$(( $pos + 1 ))