[debian-edu-commits] r82240 - in branches/wheezy/debian-edu-config: debian share/debian-edu-config/tools

pere at alioth.debian.org pere at alioth.debian.org
Wed Aug 28 10:22:21 UTC 2013


Author: pere
Date: 2013-08-28 10:22:21 +0000 (Wed, 28 Aug 2013)
New Revision: 82240

Modified:
   branches/wheezy/debian-edu-config/debian/changelog
   branches/wheezy/debian-edu-config/share/debian-edu-config/tools/show-welcome-webpage
Log:
* Rewrite code finding the localized welcome page to handle the fact
  that $LANGCODE can contain multiple values separated by colon.
* Rewrite code to show welcome page to show
  http://www.skolelinux.org/ if no URL is found in LDAP.

Modified: branches/wheezy/debian-edu-config/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-config/debian/changelog	2013-08-28 00:10:54 UTC (rev 82239)
+++ branches/wheezy/debian-edu-config/debian/changelog	2013-08-28 10:22:21 UTC (rev 82240)
@@ -1,5 +1,6 @@
 debian-edu-config (1.714~svn822XX) UNRELEASED; urgency=low
 
+  [ Wolfgang Schweer ]
   * init-ltsp.d/08-edu-hostname: fix typos.
   * init-ltsp.d/60-edu-diskless-ws: 
      - set proxies by calling 'update-proxy-from-wpad' directly instead
@@ -7,6 +8,12 @@
      - remove all internet connectivity needing ntp servers from
        /etc/ntp.conf to avoid useless lookups.
 
+  [ Petter Reinholdtsen ]
+  * Rewrite code finding the localized welcome page to handle the fact
+    that $LANGCODE can contain multiple values separated by colon.
+  * Rewrite code to show welcome page to show
+    http://www.skolelinux.org/ if no URL is found in LDAP.
+
  -- Wolfgang Schweer <wschweer at arcor.de>  Mon, 26 Aug 2013 23:09:49 +0200
 
 debian-edu-config (1.714~svn82232) wheezy-test; urgency=low

Modified: branches/wheezy/debian-edu-config/share/debian-edu-config/tools/show-welcome-webpage
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/tools/show-welcome-webpage	2013-08-28 00:10:54 UTC (rev 82239)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/tools/show-welcome-webpage	2013-08-28 10:22:21 UTC (rev 82240)
@@ -6,21 +6,24 @@
 set -e
 
 # Allow lookup script to be replaced using /etc/debian-edu/config
-GETDEFAULTHOMEPAGE=$(/usr/share/debian-edu-config/tools/get-default-homepage)
+GETDEFAULTHOMEPAGE=$(/usr/share/debian-edu-config/tools/get-default-homepage || true)
 
 if [ -e /etc/debian-edu/config ] ; then
     . /etc/debian-edu/config
 fi
 
-if echo "$PROFILE" | egrep -q 'Main-Server|Workstation|Roaming-Workstation|Thin-Client-Server|Minimal' ; then
-    if wget ${GETDEFAULTHOMEPAGE}index.html.$(echo $LANGCODE) > /dev/null 2>&1 ; then
-        welcomeurl="${GETDEFAULTHOMEPAGE}index.html.$(echo $LANGCODE)"
-        rm index.html.$(echo $LANGCODE)
-    else
-        welcomeurl=$GETDEFAULTHOMEPAGE || true
-    fi
-    else
-        welcomeurl=http://www.skolelinux.org/
+if [ "$GETDEFAULTHOMEPAGE" ] &&
+    echo "$PROFILE" | egrep -q 'Main-Server|Workstation|Roaming-Workstation|Thin-Client-Server|Minimal' ; then
+    for lang in $(echo $LANGCODE | tr : " "); do
+	if wget -O /dev/null ${GETDEFAULTHOMEPAGE}index.html.$lang ; then
+            welcomeurl="${GETDEFAULTHOMEPAGE}index.html.$lang"
+	    continue
+	else
+            welcomeurl=$GETDEFAULTHOMEPAGE || true
+	fi
+    done
+else
+    welcomeurl=http://www.skolelinux.org/
 fi
 
 if [ -z "$welcomeurl" ] || [ "about:blank" = "$welcomeurl" ]; then




More information about the debian-edu-commits mailing list