summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2012-05-02 11:23:09 -0400
committerWill Woods <wwoods@redhat.com>2012-05-02 11:23:09 -0400
commit8bdbf107f1af1fc85c895c319967f952474973df (patch)
treee58494aacc1ad1ceed8c88e543afbf6892646977
parent86b9226f6b01155c6513689e9670432e0b3be162 (diff)
downloadtestboot-8bdbf107f1af1fc85c895c319967f952474973df.tar.gz
testboot-8bdbf107f1af1fc85c895c319967f952474973df.tar.xz
testboot-8bdbf107f1af1fc85c895c319967f952474973df.zip
add --dualnic option
-rwxr-xr-xtestboot.sh9
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