#!/bin/sh # SourcesList evolutor # gettext domain TEXTDOMAIN="lliurex-up" export TEXTDOMAIN COMMON_LIBRARY="/usr/share/lliurex-up/common-upgrade-vars.sh" if [ -r $COMMON_LIBRARY ] ; then . $COMMON_LIBRARY fi #gettext messages INFO_MESSAGE="$(gettext "Update Gconf default values on system")" # Methods _serverPostUpgradeActions() { echo "Deleting users configuration" for HOMEDIRECTORY in $(find /net/home/students -mindepth 1 -maxdepth 1) ; do rm $HOMEDIRECTORY/.gconf* done for HOMEDIRECTORY in $(find /net/home/teachers -mindepth 1 -maxdepth 1) ; do rm $HOMEDIRECTORY/.gconf* done for HOMEDIRECTORY in $(find /net/home/others -mindepth 1 -maxdepth 1) ; do rm $HOMEDIRECTORY/.gconf* done } _usage() { echo "# Unknown argument" } _info() { echo "$INFO_MESSAGE" } _migrate() { _discoverCddVersion echo "$INFO_MESSAGE" for HOMEDIRECTORY in $(find /home/ -mindepth 1 -maxdepth 1) ; do rm -rf $HOMEDIRECTORY/.gconf* done rm -rf /var/lib/gdm/.* if [ $IS_SERVER -eq 0 ] ; then _serverPostUpgradeActions fi } _die() { echo "Error: $1" exit 1 } ACTION="$1" case "$ACTION" in migrate) _migrate ;; info) _info ;; *) _usage ;; esac exit 0