From 26626c75c3a013a1d82d7ea1586c0a7dbcede101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Thu, 30 Jan 2014 16:26:55 +0100 Subject: [PATCH] contrib/nm-live-vm: put qemu network-related options into a variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jiří Klimeš --- contrib/fedora/nm-live-vm/run.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/fedora/nm-live-vm/run.sh b/contrib/fedora/nm-live-vm/run.sh index 827cd0c1c1..fb018da263 100755 --- a/contrib/fedora/nm-live-vm/run.sh +++ b/contrib/fedora/nm-live-vm/run.sh @@ -1,5 +1,8 @@ #!/bin/sh +# Three network interfaces +NET_OPTIONS="-net nic -net user -net nic -net user -net nic -net user" + OS="Linux" if [ -f /etc/redhat-release ]; then OS=`cat /etc/redhat-release | cut -d" " -f1,2,3,4` @@ -13,7 +16,7 @@ if [ "$OS" == "Red Hat Enterprise Linux" ]; then PATH=$PATH:/usr/libexec - qemu-kvm -vnc :0 -m 2048 -net nic -net user -net nic -net user -net nic -net user -kernel vmlinuz -append video='1024x768' -initrd initramfs.img & + qemu-kvm -vnc :0 -m 2048 $NET_OPTIONS -kernel vmlinuz -append video='1024x768' -initrd initramfs.img & sleep 1 vncviewer localhost @@ -28,6 +31,6 @@ else QEMU="qemu-system-$ARCH -enable-kvm" } - $QEMU -m 2048 -net nic -net user -net nic -net user -net nic -net user -kernel vmlinuz -append video='1024x768' -initrd initramfs.img + $QEMU -m 2048 -net nic $NET_OPTIONS -kernel vmlinuz -append video='1024x768' -initrd initramfs.img fi