summaryrefslogtreecommitdiffstats
path: root/remote/modules/vmware/data
diff options
context:
space:
mode:
authorSimon Rettberg2015-03-04 16:08:22 +0100
committerSimon Rettberg2015-03-04 16:08:22 +0100
commit2d7177a3710e791057c55f65bdcbe7d6012d214c (patch)
treeeaa853920bf046b965a7f6820c23a2530c008d89 /remote/modules/vmware/data
parent[freiburg-config] sssd: etc/sssd/sssd.conf perms adjusted (or tried to) (diff)
downloadtm-scripts-2d7177a3710e791057c55f65bdcbe7d6012d214c.tar.gz
tm-scripts-2d7177a3710e791057c55f65bdcbe7d6012d214c.tar.xz
tm-scripts-2d7177a3710e791057c55f65bdcbe7d6012d214c.zip
[vm*] Only explicitly set sound card if there's more than one in the host system
Diffstat (limited to 'remote/modules/vmware/data')
-rw-r--r--remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include14
1 files changed, 11 insertions, 3 deletions
diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include
index 016ebdc6..47c96ec1 100644
--- a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include
+++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include
@@ -258,15 +258,15 @@ runvmwareconfheader ()
ethernet0.present = "TRUE"
ethernet0.addressType = "static"
$network_virtualDev
- ethernet0.connectionType = "hostonly"
- #ethernet1.connectionType = "custom"
+ #ethernet0.connectionType = "hostonly"
+ ethernet0.connectionType = "custom"
ethernet0.vnet = "$hostdev"
ethernet0.address = "00:50:56:$macaddrsuffix"
ethernet0.wakeOnPcktRcv = "FALSE"
# sound
sound.present = "TRUE"
- sound.fileName = "sysdefault:CARD=$SOUND_CARD_INDEX"
+ $sound_fileName
sound.autodetect = "FALSE"
sound.virtualdev = "$sound"
pciSound.enableVolumeControl = "FALSE"
@@ -469,6 +469,14 @@ esac
# set standard sound card, overwrite depending on OS (options sb16, es1371, hdaudio)
sound="es1371"
+# set sound card explicitly if there is more than one card in the host system
+if [ -n "$SOUND_CARD_INDEX" -a -n "$SOUND_CARD_COUNT" ] && [ "$SOUND_CARD_COUNT" -gt 1 ]; then
+ sound_fileName="sound.fileName = \"sysdefault:CARD=${SOUND_CARD_INDEX}\""
+else
+ sound_fileName='sound.fileName = "-1"
+sound.autodetect = "TRUE"'
+fi
+
# check for 3D configuration setting
case "$enable3d" in
true|yes)