From 8a8a875916d58f39e2d3dce4bb0db76564caae2d Mon Sep 17 00:00:00 2001 From: Rob White Date: Wed, 18 Sep 2024 10:34:00 +0100 Subject: [PATCH] Fix - community theme_click-to-continue-legacy for newer releases of openNDS Signed-off-by: Rob White --- .../theme_click-to-continue-legacy.sh | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) mode change 100644 => 100755 community/themespec/theme_legacy/theme_click-to-continue-legacy.sh diff --git a/community/themespec/theme_legacy/theme_click-to-continue-legacy.sh b/community/themespec/theme_legacy/theme_click-to-continue-legacy.sh old mode 100644 new mode 100755 index 6a5ae9f..d1f1904 --- a/community/themespec/theme_legacy/theme_click-to-continue-legacy.sh +++ b/community/themespec/theme_legacy/theme_click-to-continue-legacy.sh @@ -40,13 +40,31 @@ click_to_continue() { if [ -e "$legacy" ]; then cp $legacy $legacysplash + get_option_from_config gatewayport + + if [ -z "$gatewayport"]; then + gatewayport="2050" + fi + sedstr="s|\$gatewayname|$gatewayname|" sed -i "$sedstr" "$legacysplash" - authaction="/opennds_auth/" + htmlentitydecode $gatewayurl + gatewayurl=$entitydecoded + authaction="$gatewayurl/opennds_auth/" sedstr="s|\$authaction|$authaction|" sed -i "$sedstr" "$legacysplash" + css_rel="\"/splash.css\"" + css_abs="\"$gatewayurl/splash.css\"" + sedstr="s|$css_rel|$css_abs|" + sed -i "$sedstr" "$legacysplash" + + img_rel="\"/images/splash.jpg\"" + img_abs="\"$gatewayurl/images/splash.jpg\"" + sedstr="s|$img_rel|$img_abs|" + sed -i "$sedstr" "$legacysplash" + option="gatewayfqdn" get_option_from_config