diff options
author | Simon Rettberg | 2023-06-02 16:44:34 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-06-02 16:44:34 +0200 |
commit | 0b06cf69d427b6133c1af8bf80ef8292bb525242 (patch) | |
tree | 6dca38ff3ffdbf82dbfc88a22c775a3294abe6c8 /core/modules | |
parent | [remote-access] Fix ~ (diff) | |
download | mltk-0b06cf69d427b6133c1af8bf80ef8292bb525242.tar.gz mltk-0b06cf69d427b6133c1af8bf80ef8292bb525242.tar.xz mltk-0b06cf69d427b6133c1af8bf80ef8292bb525242.zip |
[run-virt] Don't logspam if not using custom resource URLs
Diffstat (limited to 'core/modules')
-rw-r--r-- | core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/load_configs.inc | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/load_configs.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/load_configs.inc index 7a132fcc..f405d032 100644 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/load_configs.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/load_configs.inc @@ -19,24 +19,32 @@ load_configs() { $(safesource --exit "$VMCHOOSER_CONF_DIR/virtualization.conf") # Load config for resource URLs - $(safesource "$VMCHOOSER_CONF_DIR/resource_urls.conf") - if [ -z "$url_lecture_config" ]; then - writelog "URL for lecture config was not explicitly set, trying legacy method..." + if [ -s "$VMCHOOSER_CONF_DIR/resource_urls.conf" ]; then + $(safesource "$VMCHOOSER_CONF_DIR/resource_urls.conf") + else + writelog "No resource URL overrides file provided..." + fi + if [ -n "$url_lecture_config" ]; then + writelog "URL for lecture config was set to $url_lecture_config" + else check_base_url url_lecture_config="${SLX_VMCHOOSER_BASE_URL}/lecture/%UUID%" fi - if [ -z "$url_lecture_metadata" ]; then - writelog "URL for lecture metadata was not explicitly set, trying legacy method..." + if [ -n "$url_lecture_metadata" ]; then + writelog "URL for lecture metadata was set to $url_lecture_metadata" + else check_base_url url_lecture_metadata="${SLX_VMCHOOSER_BASE_URL}/lecture/%UUID%/metadata" fi - if [ -z "$url_lecture_netshares" ]; then - writelog "URL for lecture netshares was not explicitly set, trying legacy method..." + if [ -n "$url_lecture_netshares" ]; then + writelog "URL for lecture netshares was set to $url_lecture_netshares" + else check_base_url url_lecture_netshares="${SLX_VMCHOOSER_BASE_URL}/lecture/%UUID%/netshares" fi - if [ -z "$url_lecture_runscript" ]; then - writelog "URL for lecture runscript was not explicitly set, trying legacy method..." + if [ -n "$url_lecture_runscript" ]; then + writelog "URL for lecture runscript was set to $url_lecture_runscript" + else check_base_url url_lecture_runscript="${SLX_VMCHOOSER_BASE_URL}/lecture/%UUID%/runscript" fi |