From fdb59f9f07edb362ed4a2186e38fe8a879e92fe6 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Wed, 12 Dec 2018 14:25:43 +0100 Subject: [vmchooser] respect new urls params from resource_urls.conf --- core/modules/vmchooser2/data/opt/openslx/bin/vmchooser | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'core/modules/vmchooser2') diff --git a/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser b/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser index 0e73cabe..08da8bff 100755 --- a/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser +++ b/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser @@ -17,6 +17,14 @@ else /opt/openslx/cups/printergui --error "$ERRMSG" || notify-send "Fehler" "$ERRMSG" fi +URLS_CONF="/opt/openslx/vmchooser/config/resource_urls.conf" +if [ -s "$URLS_CONF" ]; then + . "$URLS_CONF" + [ -n "$url_list" ] && EXTRA="$EXTRA --url-list $url_list" + [ -n "$url_news" ] && EXTRA="$EXTRA --url-news $url_news" + [ -n "$url_help" ] && EXTRA="$EXTRA --url-help $url_help" +fi + [ -s "/run/hwinfo" ] && . "/run/hwinfo" if [ -z "$HW_MBRAM" ]; then MEM=$(grep -m1 '^MemTotal:' /proc/meminfo | awk '{print $2}') @@ -65,11 +73,10 @@ if /opt/openslx/lightdm/is-autologin-enabled && [ -s "/run/openslx/session-kille fi fi -# No quotes around $EXTRA! -if [ -z "$SLX_LOCATIONS" ]; then - exec vmchooser.real "$@" --url "$URL" --fullscreen --tab "$TAB" --start-uuid "$SLX_EXAM_START" $EXTRA +if [ -n "$SLX_LOCATIONS" ]; then + EXTRA="$EXTRA --locations $SLX_LOCATIONS" fi # No quotes around $EXTRA! -exec vmchooser.real "$@" --url "$URL" --fullscreen --tab "$TAB" --start-uuid "$SLX_EXAM_START" --locations "$SLX_LOCATIONS" $EXTRA +exec vmchooser.real "$@" --url "$URL" --fullscreen --tab "$TAB" --start-uuid "$SLX_EXAM_START" $EXTRA -- cgit v1.2.3-55-g7522