summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/virtualbox/files/run-virt.include
diff options
context:
space:
mode:
authorMichael Janczyk2010-04-02 20:50:29 +0200
committerMichael Janczyk2010-04-02 20:50:29 +0200
commit5dd09617cd77f2a616c770152c4cd8319803a05f (patch)
tree09f9a8d21be95907c0ce8cebeb2d47456a291778 /os-plugins/plugins/virtualbox/files/run-virt.include
parentxen nfs boot, xen boot (diff)
downloadcore-5dd09617cd77f2a616c770152c4cd8319803a05f.tar.gz
core-5dd09617cd77f2a616c770152c4cd8319803a05f.tar.xz
core-5dd09617cd77f2a616c770152c4cd8319803a05f.zip
qemu tap coniguration hell
Diffstat (limited to 'os-plugins/plugins/virtualbox/files/run-virt.include')
-rw-r--r--os-plugins/plugins/virtualbox/files/run-virt.include42
1 files changed, 19 insertions, 23 deletions
diff --git a/os-plugins/plugins/virtualbox/files/run-virt.include b/os-plugins/plugins/virtualbox/files/run-virt.include
index abf1e0be..2a0b84a2 100644
--- a/os-plugins/plugins/virtualbox/files/run-virt.include
+++ b/os-plugins/plugins/virtualbox/files/run-virt.include
@@ -212,29 +212,25 @@ esac
# translate boot, use if set else set to HardDisk
# usually support for a,c,d,n, stands for Floppy, HD, CD-ROM, Network
# support nfs and tftp as well
-if [ -n "${boot}" ]; then
- case ${boot} in
- n*|tftp)
- boot="Network"
- if [ "${network_kind}" = "NAT" ] && [ -n "${virtualbox_tftpdir}" ]; then
- # remove spaces from VM name to avoid Problems /w TFTP in NAT
- vm_name=$(echo ${vm_name} | sed -e "s, ,-,g")
- # link TFTP dir for NAT TFTP boots
- mkdir -p ${confdir}/TFTP
- cp ${virtualbox_tftpdir}/pxelinux.0 ${confdir}/TFTP/${vm_name}.pxe
- for i in $(ls ${virtualbox_tftpdir}); do
- ln -sf ${virtualbox_tftpdir}/${i} ${confdir}/TFTP/${i}
- done
- fi
- ;;
- # later maybe c|disk|hd*|sd*) for HD and d|cd*) for CD-ROM
- *)
- boot="HardDisk"
- ;;
- esac
-else
- boot="HardDisk"
-fi
+case ${boot} in
+ n*|tftp)
+ boot="Network"
+ if [ "${network_kind}" = "NAT" ] && [ -n "${virtualbox_tftpdir}" ]; then
+ # remove spaces from VM name to avoid Problems /w TFTP in NAT
+ vm_name=$(echo ${vm_name} | sed -e "s, ,-,g")
+ # link TFTP dir for NAT TFTP boots
+ mkdir -p ${confdir}/TFTP
+ cp ${virtualbox_tftpdir}/pxelinux.0 ${confdir}/TFTP/${vm_name}.pxe
+ for i in $(ls ${virtualbox_tftpdir}); do
+ ln -sf ${virtualbox_tftpdir}/${i} ${confdir}/TFTP/${i}
+ done
+ fi
+ ;;
+ # later maybe c|disk|hd*|sd*) for HD and d|cd*) for CD-ROM
+ *)
+ boot="HardDisk"
+ ;;
+esac
# external GUI
vrdpport="590${VM_ID}"