summaryrefslogtreecommitdiffstats
path: root/remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc
diff options
context:
space:
mode:
authorSimon Rettberg2016-10-31 15:56:27 +0100
committerSimon Rettberg2016-10-31 15:56:27 +0100
commitbc9bf92025c2dbe1742da1af39a9738ea7c9eb55 (patch)
tree67897eb54ce718bb5726e13a56c81daa92fe8f92 /remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc
parent[vmware] Update to 12.5.1 (diff)
downloadtm-scripts-bc9bf92025c2dbe1742da1af39a9738ea7c9eb55.tar.gz
tm-scripts-bc9bf92025c2dbe1742da1af39a9738ea7c9eb55.tar.xz
tm-scripts-bc9bf92025c2dbe1742da1af39a9738ea7c9eb55.zip
[run-virt] Use xmlstarlet for xml operations
Diffstat (limited to 'remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc')
-rw-r--r--remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc4
1 files changed, 1 insertions, 3 deletions
diff --git a/remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc b/remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc
index d40d97bb..cf0d545b 100644
--- a/remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc
+++ b/remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc
@@ -8,9 +8,7 @@ declare -rg VMSTORE_PATH=/mnt/vmstore
# Need some lean and mean xml parser some day in the far future
get_xml () {
- grep -Pio "<$1"'\s+param=[^"]*".*' "${xmlfile}" \
- | awk -F '"' '{ print $2 }' \
- | sed 's/&amp;/+/g;s/&quot;/"/g;s/&lt;/</g;s/&gt;/>/g'
+ xmlextract "//settings/eintrag/${1}/@param" "${xmlfile}"
}
IMGUUID=$(get_xml "uuid")