summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os-plugins/plugins/vmchooser/files/run-virt.sh5
-rw-r--r--os-plugins/plugins/vmware/files/run-virt.include29
2 files changed, 28 insertions, 6 deletions
diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh
index 41144edd..d7539701 100644
--- a/os-plugins/plugins/vmchooser/files/run-virt.sh
+++ b/os-plugins/plugins/vmchooser/files/run-virt.sh
@@ -87,8 +87,9 @@ vmostype=$(grep -io "<os param=.*\"" ${xml} | awk -F "\"" '{ print $2 }')
# Definition of the networking the client system is connected to
network_kind=$(grep -io "<network param=.*\"" ${xml} | awk -F "\"" '{ print $2 }')
-# Serial port defined (e.g. "ttyS0" or "autodetect")
-serial=$(grep -io "<serial port=.*\"" ${xml} | awk -F "\"" '{ print $2 }')
+# Serial/parallel ports defined (e.g. "ttyS0" or "autodetect")
+serial=$(grep -io "<serialport param=.*\"" ${xml} | awk -F "\"" '{ print $2 }')
+parallel=$(grep -io "<parport param=.*\"" ${xml} | awk -F "\"" '{ print $2 }')
# Declaration of default variables
diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include
index 56b37d4d..a9c8fb04 100644
--- a/os-plugins/plugins/vmware/files/run-virt.include
+++ b/os-plugins/plugins/vmware/files/run-virt.include
@@ -141,7 +141,12 @@ isolation.tools.paste.enabled = \"TRUE\"
# serial port
serial0.present = \"${serial}\"
-${serialdev}" >>${conffile}
+${serialdev}
+
+# parallel port
+parallel0.present = \"${parallel}\"
+parallel0.bidirectional = \"${paralbidi}\"
+${paraldev}" >>${conffile}
# set the appropriate permissions for the vmware config file
chmod u+rwx ${conffile} >/dev/null 2>&1
@@ -231,14 +236,13 @@ case "$enable3d" in
;;
esac
-# serial port defined (e.g. "ttyS0" or "autodetect")
-serial=$(grep -i "<serial port=\"" ${xml} | awk -F "\"" '{ print $2 }')
+# serial/parallel port defined (e.g. "ttyS0, lp0" or "autodetect")
case "$serial" in
tty*)
serialdev="serial0.filename = \"/dev/${serial}\""
serial="TRUE"
;;
- autodetect)
+ auto*)
serialdev="serial0.autodetect = \"TRUE\""
serial="TRUE"
;;
@@ -247,6 +251,23 @@ case "$serial" in
serial="FALSE"
;;
esac
+case "$parallel" in
+ lp*)
+ paraldev="parallel0.filename = \"/dev/${parallel}\""
+ paralbidi="TRUE"
+ parallel="TRUE"
+ ;;
+ auto*)
+ paraldev="parallel0.autodetect = \"TRUE\""
+ paralbidi="TRUE"
+ parallel="TRUE"
+ ;;
+ *)
+ paraldev=""
+ paralbidi="FALSE"
+ parallel="FALSE"
+ ;;
+esac
# percentage of memory to use for vmwares in standard case
permem=30