summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSebastian Schmelzer2011-07-21 16:03:35 +0200
committerSebastian Schmelzer2011-07-21 16:03:35 +0200
commit67d156eae5534840fb0e0f918570878a5ce18724 (patch)
tree77607ec979bb31d65aed607ebefe4952f97ab6f8 /src
parentMerge branch 'master' of openslx.org:openslx/core (diff)
downloadcore-67d156eae5534840fb0e0f918570878a5ce18724.tar.gz
core-67d156eae5534840fb0e0f918570878a5ce18724.tar.xz
core-67d156eae5534840fb0e0f918570878a5ce18724.zip
dynamic mac for vmchooser // fix awk, tr error in runvirt
Diffstat (limited to 'src')
-rw-r--r--src/os-plugins/plugins/vmchooser/files/run-virt.sh2
-rw-r--r--src/os-plugins/plugins/vmware/files/run-virt.include5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/os-plugins/plugins/vmchooser/files/run-virt.sh b/src/os-plugins/plugins/vmchooser/files/run-virt.sh
index d62a13ae..e89affeb 100644
--- a/src/os-plugins/plugins/vmchooser/files/run-virt.sh
+++ b/src/os-plugins/plugins/vmchooser/files/run-virt.sh
@@ -344,7 +344,7 @@ yres=$(echo "${hostres}" | awk '{print $7}')
# Resolution defined via xml parameter: fullscreen, full/X*Y/depth; windowed,
# win/X*Y/depth
-userres=$(grep -io '<screen param=.*"' ${xmlfile} | awk -F '"' '{ print $2 }' \
+userres=$(grep -io '<screen param=.*"' ${xmlfile} | awk -F '"' '{ print $2 }' | \
tr "A-Z" "a-z")
case "${userres}" in
full*)
diff --git a/src/os-plugins/plugins/vmware/files/run-virt.include b/src/os-plugins/plugins/vmware/files/run-virt.include
index 64b72f17..8595beb1 100644
--- a/src/os-plugins/plugins/vmware/files/run-virt.include
+++ b/src/os-plugins/plugins/vmware/files/run-virt.include
@@ -229,6 +229,11 @@ pref.eula.1.buildNumber = \"${vmbuild}\"" >${vmhome}/preferences
# VM-ID static (0D), remove if changed to 00
VM_ID="0D"
+# should be dynamic
+if [ "x$(which bc)" != "x" ]; then
+ VM_ID=$(echo "obase=16; $$" | bc)
+ VM_ID=$(expr substr $VM_ID $(expr ${#VM_ID} -1) 2)
+fi
# temporary disk space for logs, etc...
redodir=/tmp/vmware/${USER}.$$
# dir for configs and vmem file