summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2012-05-03 21:04:50 -0400
committerWill Woods <wwoods@redhat.com>2012-05-09 15:45:25 -0400
commit0460b0bb51c66d6ef6f69ca9eaf32b360970de4c (patch)
tree620db4708dcb061cf545e309cd078c6a1447b387
parent8bdbf107f1af1fc85c895c319967f952474973df (diff)
downloadtestboot-0460b0bb51c66d6ef6f69ca9eaf32b360970de4c.tar.gz
testboot-0460b0bb51c66d6ef6f69ca9eaf32b360970de4c.tar.xz
testboot-0460b0bb51c66d6ef6f69ca9eaf32b360970de4c.zip
add --nonic option
-rwxr-xr-xtestboot.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/testboot.sh b/testboot.sh
index 57b8a6a..d90cda8 100755
--- a/testboot.sh
+++ b/testboot.sh
@@ -14,8 +14,9 @@ graphics="vnc"
dracut_opts="--add anaconda --omit plymouth"
usecd="true"
+usenet="true"
ARGS=$(getopt --options "dcstm:" \
- --longoptions "fromcd,nocd,virtconsole,serialconsole,text,dualnic,ram:" \
+ --longoptions "fromcd,nocd,virtconsole,serialconsole,text,dualnic,nonic,ram:"\
--name testboot.sh \
-- "$@") || exit 1
eval set -- "$ARGS"
@@ -23,6 +24,7 @@ while :; do case "$1" in
-d|--fromcd) fromcd="true"; shift;;
--nocd) usecd=""; shift;;
--dualnic) dualnic="yes"; shift;;
+ --nonic) dualnic=""; usenet=""; nonet="on"; shift;;
-c|--virtconsole) console="--console pty"; shift;;
-s|--serialconsole) console="--serial pty"; shift;;
-t|--text) graphics="none"; shift;;
@@ -160,7 +162,8 @@ virsh undefine testboot &>/dev/null
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 \
+ ${nonet:+--nonetworks} \
+ ${usenet:+--network network=default,model=virtio,mac=52:54:00:03:31:38} \
${dualnic:+--network network=default,model=virtio,mac=52:54:00:03:31:39} \
${usecd:+--disk $cdrom,device=cdrom} \
${bootarg:+--boot "$bootarg"}