summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xabout/about-mageia37
1 files changed, 18 insertions, 19 deletions
diff --git a/about/about-mageia b/about/about-mageia
index 6f981c0..f37d256 100755
--- a/about/about-mageia
+++ b/about/about-mageia
@@ -1,22 +1,21 @@
#!/bin/sh
-if [ "x$GNOME_DESKTOP_SESSION_ID" != "x" -a -x /usr/bin/yelp ]; then
- www_browser="/usr/bin/yelp"
-else
- www_browser="xdg-open"
-fi
-
-for lang in `echo $LANG:$LANGUAGE | tr ':' ' ' | cut -d'_' -f1` ; do
- file="/usr/share/mdk/about/index-$lang.html"
- if [ -f "$file" ]; then
- $www_browser $file
- exit 0
- fi
-done
+WGET="$(which wget)"
-if [ -f /usr/share/mdk/about/index.html ]; then
- $www_browser /usr/share/mdk/about/index.html
- exit 0
+$WGET -q --tries=20 --timeout=10 http://www.google.com -O /tmp/google.idx &> /dev/null
+if [ ! -s /tmp/google.idx ]; then
+ echo "ERROR: No internet connection detected.
+In order to display About Mageia page you should have an working connection."
+ exit 1
+else
+ for lang in `echo $LANG:$LANGUAGE | tr ':' ' ' | cut -d'_' -f1` ; do
+ $WGET -q --tries=20 --timeout=10 http://www.mageia.org/$lang/about -O /tmp/mageiaorg.idx &> /dev/null
+ if [ ! -s /tmp/mageiaorg.idx ]; then
+ echo "WARNING: There is no localized Mageia About web page;
+displaying English web page"
+ xdg-open "http://www.mageia.org/en/about"
+ else
+ xdg-open "http://www.mageia.org/$lang/about"
+ exit 0
+ fi
+ done
fi
-
-echo "file not found for about Mageia"
-exit 1