diff options
author | Will Woods <wwoods@redhat.com> | 2012-05-02 11:23:09 -0400 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2012-05-02 11:23:09 -0400 |
commit | 8bdbf107f1af1fc85c895c319967f952474973df (patch) | |
tree | e58494aacc1ad1ceed8c88e543afbf6892646977 | |
parent | 86b9226f6b01155c6513689e9670432e0b3be162 (diff) | |
download | testboot-8bdbf107f1af1fc85c895c319967f952474973df.tar.gz testboot-8bdbf107f1af1fc85c895c319967f952474973df.tar.xz testboot-8bdbf107f1af1fc85c895c319967f952474973df.zip |
add --dualnic option
-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 |