fix if exist iso

master
fanta 2 years ago
parent d23f73c8c3
commit 9a707be15e

16
q

@ -25,15 +25,15 @@ function downloadSysIsos(){
echo " $vmsDir/${data[0]}-${data[1]}-${data[2]}/$isoName exists"
else
wget -q $url -O $vmsDir/${data[0]}-${data[1]}-${data[2]}/$isoName
echo " Create img [$sizeDisc] $vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.qcow2"
qemu-img create -q -f qcow2 "$vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.qcow2" $sizeDisc
echo " Create script $vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.sh"
echo "#!/bin/bash" > "$vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.sh"
echo "qemu-system-${data[2]} $extra -m $sizeRam -cdrom $vmsDir/${data[0]}-${data[1]}-${data[2]}/$isoName -hda $vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.qcow2" >> "$vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.sh"
echo " Create start script"
echo "#!/bin/bash" > "$vmsDir/${data[0]}-${data[1]}-${data[2]}/start.sh"
echo "qemu-system-${data[2]} $extra -m $sizeRam -hda $vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.qcow2" > "$vmsDir/${data[0]}-${data[1]}-${data[2]}/start.sh"
fi
echo " Create img [$sizeDisc] $vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.qcow2"
qemu-img create -q -f qcow2 "$vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.qcow2" $sizeDisc
echo " Create script $vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.sh"
echo "#!/bin/bash" > "$vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.sh"
echo "qemu-system-${data[2]} $extra -m $sizeRam -cdrom $vmsDir/${data[0]}-${data[1]}-${data[2]}/$isoName -hda $vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.qcow2" >> "$vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.sh"
echo " Create start script"
echo "#!/bin/bash" > "$vmsDir/${data[0]}-${data[1]}-${data[2]}/start.sh"
echo "qemu-system-${data[2]} $extra -m $sizeRam -hda $vmsDir/${data[0]}-${data[1]}-${data[2]}/${data[0]}-${data[1]}-${data[2]}.qcow2" > "$vmsDir/${data[0]}-${data[1]}-${data[2]}/start.sh"
done < $vmsDir/.systems.lst
}

Loading…
Cancel
Save