#!/bin/sh # Make Debian Edu's show-welcome-page think that the welcome page has already been shown. set -e HOMEDIR=/home/$USER # Allow lookup script to be replaced using /etc/debian-edu/config GETDEFAULTHOMEPAGE=$(/usr/share/debian-edu-config/tools/get-default-homepage || true) if [ -e /etc/debian-edu/config ] ; then . /etc/debian-edu/config fi if [ -n "$GETDEFAULTHOMEPAGE" ] && echo "$PROFILE" | egrep -q 'Main-Server|Workstation|Roaming-Workstation|LTSP-Server|Minimal' ; then 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 else welcomeurl=$GETDEFAULTHOMEPAGE || true fi else welcomeurl=http://www.skolelinux.org/ fi if [ -z "$welcomeurl" ] || [ "about:blank" = "$welcomeurl" ]; then exit 0 fi flagdir="$HOMEDIR/.debian-edu" flagfile="$flagdir/welcome-page-shown" if [ ! -f "$flagfile" ] ; then echo "$welcomeurl" > "$flagfile" else oldwelcomeurl="$(cat $flagfile)" if [ "$welcomeurl" != "$oldwelcomeurl" ] ; then echo "$welcomeurl" > "$flagfile" fi fi