@cryptotaxi247 / infra-1 / commits / 56a77f81

svn path=/configurations/trunk/tud/; revision=27213

svn path=/configurations/trunk/tud/; revision=27213

Eelco Dolstra committed May 10, 2011 at 13:37 UTC 56a77f81b48f4968af601ef30701eca0465b5bb5
1 file changed +1 -4
cloud/scripts/create-vm
+1 -4
@@ -7,10 +7,7 @@ id="$1"
7 # Assign a number to the VM. From this we derive the MAC and IPv6 addresses.
8 lastnr=$(flock -x /vmdisks/adhoc-cloud/lock -c 'lastnr=$(cat /vmdisks/adhoc-cloud/last-nr || echo 65536); lastnr=$(($lastnr + 1)); echo $lastnr; echo $lastnr > /vmdisks/adhoc-cloud/last-nr')
9
10 -# If no id is given, use the number.
11 -if [ -z "$id" ]; then
12 - id="i-$lastnr"
13 -fi
10 +id="i-$lastnr${id:+-$id}"
11
12 xml=/vmdisks/adhoc-cloud/"$id".xml
13 image=/vmdisks/adhoc-cloud/"$id".qcow2