summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-02-27 08:22:33 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-02-27 08:22:33 +0100
commit3f2758333c2085e86622ca145a538cabc34a96d7 (patch)
tree85d6db394e0bc171d0774081365e467b5db5a0f4
parent2ff786a94bcae9d11e3652c234527d37896b44cd (diff)
downloaditzks-systems-3f2758333c2085e86622ca145a538cabc34a96d7.tar.gz
itzks-systems-3f2758333c2085e86622ca145a538cabc34a96d7.tar.bz2
itzks-systems-3f2758333c2085e86622ca145a538cabc34a96d7.zip
etc/mklocaluser.d/60-itzks-systems-roamingworkstation_disable-welcome-page: Only do LANGCODE i18n page lookups, if homepage points to TJENER.
-rwxr-xr-xetc/mklocaluser.d/60-itzks-systems-roamingworkstation_disable-welcome-page19
1 files changed, 11 insertions, 8 deletions
diff --git a/etc/mklocaluser.d/60-itzks-systems-roamingworkstation_disable-welcome-page b/etc/mklocaluser.d/60-itzks-systems-roamingworkstation_disable-welcome-page
index 1cdcd18..3f7a863 100755
--- a/etc/mklocaluser.d/60-itzks-systems-roamingworkstation_disable-welcome-page
+++ b/etc/mklocaluser.d/60-itzks-systems-roamingworkstation_disable-welcome-page
@@ -14,14 +14,17 @@ fi
if [ "$GETDEFAULTHOMEPAGE" ] &&
echo "$PROFILE" | egrep -q 'Main-Server|Workstation|Roaming-Workstation|LTSP-Server|Minimal' ; then
- for lang in $(echo $LANGCODE | tr : " "); do
- if wget -q -O /dev/null ${GETDEFAULTHOMEPAGE}index.html.$lang ; then
- welcomeurl="${GETDEFAULTHOMEPAGE}index.html.$lang"
- break
- else
- welcomeurl=$GETDEFAULTHOMEPAGE || true
- fi
- done
+ host="$(echo $GETDEFAULTHOMEPAGE | sed -re 's@[^:]+://([^/]+)/.*@\1@')"
+ if [ "x$host" = "xwww" ] || [ "x$host" = "xwww.intern" ]; then
+ for lang in $(echo $LANGCODE | tr : " "); do
+ if wget -q -O /dev/null ${GETDEFAULTHOMEPAGE}index.html.$lang ; then
+ welcomeurl="${GETDEFAULTHOMEPAGE}index.html.$lang"
+ break
+ else
+ welcomeurl=$GETDEFAULTHOMEPAGE || true
+ fi
+ done
+ fi
else
welcomeurl=http://www.skolelinux.org/
fi