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

schweer-guest at alioth.debian.org schweer-guest at alioth.debian.org
Sun Aug 25 14:21:14 UTC 2013


Author: schweer-guest
Date: 2013-08-25 14:21:14 +0000 (Sun, 25 Aug 2013)
New Revision: 82211

Modified:
   branches/wheezy/debian-edu-config/debian/changelog
   branches/wheezy/debian-edu-config/share/debian-edu-config/tools/show-welcome-webpage
Log:
Show localized welcomepage for supported languages by checking
www/index.html.$LANGCODE in share/tools/show-welcome-page.

Modified: branches/wheezy/debian-edu-config/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-config/debian/changelog	2013-08-24 16:33:34 UTC (rev 82210)
+++ branches/wheezy/debian-edu-config/debian/changelog	2013-08-25 14:21:14 UTC (rev 82211)
@@ -4,6 +4,8 @@
   * Fix KDE proxy settings by changing ioslaverc to use
     http://wpad/wpad.dat for proxy settings (ProxyType=2) instead of
     depending on KDE to find the proxy on its own (ProxyType=3).
+  * Show localized welcomepage for supported languages by checking
+    www/index.html.$LANGCODE in share/tools/show-welcome-page.
 
   [ Petter Reinholdtsen ]
   * Make sure gosa-create ignore errors from nscd, as the calls will

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-24 16:33:34 UTC (rev 82210)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/tools/show-welcome-webpage	2013-08-25 14:21:14 UTC (rev 82211)
@@ -6,16 +6,21 @@
 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)
 
 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
-    welcomeurl=$($GETDEFAULTHOMEPAGE || true)
-else
-    welcomeurl=http://www.skolelinux.org/
+    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/
 fi
 
 if [ -z "$welcomeurl" ] || [ "about:blank" = "$welcomeurl" ]; then




More information about the debian-edu-commits mailing list