diff options
-rwxr-xr-x | testboot.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/testboot.sh b/testboot.sh index 9cb6f0d..57b8a6a 100755 --- a/testboot.sh +++ b/testboot.sh @@ -15,13 +15,14 @@ dracut_opts="--add anaconda --omit plymouth" usecd="true" ARGS=$(getopt --options "dcstm:" \ - --longoptions "fromcd,nocd,virtconsole,serialconsole,text,ram:" \ - --name testboot.sh \ - -- "$@") || exit 1 + --longoptions "fromcd,nocd,virtconsole,serialconsole,text,dualnic,ram:" \ + --name testboot.sh \ + -- "$@") || exit 1 eval set -- "$ARGS" while :; do case "$1" in -d|--fromcd) fromcd="true"; shift;; --nocd) usecd=""; shift;; + --dualnic) dualnic="yes"; shift;; -c|--virtconsole) console="--console pty"; shift;; -s|--serialconsole) console="--serial pty"; shift;; -t|--text) graphics="none"; shift;; @@ -160,7 +161,7 @@ virt-install --name testboot --ram $ram --graphics $graphics \ --os-type linux --os-variant fedora16 $console \ --disk $disk,size=10 --disk $disk2,size=10 \ --network network=default,model=virtio,mac=52:54:00:03:31:38 \ - --network network=default,model=virtio,mac=52:54:00:03:31:39 \ + ${dualnic:+--network network=default,model=virtio,mac=52:54:00:03:31:39} \ ${usecd:+--disk $cdrom,device=cdrom} \ ${bootarg:+--boot "$bootarg"} virsh destroy testboot &>/dev/null |