mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 09:50:28 +01:00
contrib/nm-live-vm: put qemu network-related options into a variable
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
This commit is contained in:
parent
9b3922390c
commit
26626c75c3
1 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue