source: lliurex-up/trunk/old/scripts/apply-gconf @ 2636

Last change on this file since 2636 was 2636, checked in by kbut, 3 years ago

add old files

File size: 1.2 KB
Line 
1#!/bin/sh
2# SourcesList evolutor
3
4# gettext domain
5TEXTDOMAIN="lliurex-up"
6export TEXTDOMAIN
7
8COMMON_LIBRARY="/usr/share/lliurex-up/common-upgrade-vars.sh"
9if [  -r $COMMON_LIBRARY  ] ; then 
10        . $COMMON_LIBRARY
11fi
12
13#gettext messages
14INFO_MESSAGE="$(gettext "Update Gconf default values on system")"
15
16
17# Methods
18
19_serverPostUpgradeActions()
20{
21        echo "Deleting users configuration"
22        for HOMEDIRECTORY in $(find /net/home/students -mindepth 1 -maxdepth 1) ; do 
23                rm $HOMEDIRECTORY/.gconf*
24        done
25        for HOMEDIRECTORY in $(find /net/home/teachers -mindepth 1 -maxdepth 1) ; do 
26                rm $HOMEDIRECTORY/.gconf*
27        done
28        for HOMEDIRECTORY in $(find /net/home/others -mindepth 1 -maxdepth 1) ; do 
29                rm $HOMEDIRECTORY/.gconf*
30        done
31}
32
33
34_usage()
35{
36        echo "# Unknown argument"
37}
38
39_info()
40{
41        echo "$INFO_MESSAGE"
42}
43
44_migrate()
45{
46        _discoverCddVersion     
47        echo "$INFO_MESSAGE"
48        for HOMEDIRECTORY in $(find /home/ -mindepth 1 -maxdepth 1) ; do
49                rm -rf $HOMEDIRECTORY/.gconf*
50        done
51        rm -rf /var/lib/gdm/.*
52       
53        if [ $IS_SERVER -eq 0 ] ; then
54                _serverPostUpgradeActions       
55        fi
56       
57}
58
59_die()
60{
61        echo "Error: $1"
62        exit 1
63}
64
65ACTION="$1"
66case "$ACTION" in
67        migrate)
68                _migrate
69        ;;
70        info)
71                _info
72        ;;
73        *)
74                _usage
75        ;;
76esac
77
78exit 0
Note: See TracBrowser for help on using the repository browser.