Subversion Repositories livecd

Rev

Rev 33 | Rev 117 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33 Rev 94
Line 26... Line 26...
26
         /usr/share/doc \
26
         /usr/share/doc \
27
         /usr/share/info \
27
         /usr/share/info \
28
         /usr/share/anaconda \
28
         /usr/share/anaconda \
29
         /usr/share/gdm \
29
         /usr/share/gdm \
30
         /var/cache/yum \
30
         /var/cache/yum \
31
         /var/lib/rpm \
-
 
32
         /etc/cups/ppds.dat \
31
         /etc/cups/ppds.dat \
33
         /etc/gconf/gconf.xml.defaults \
32
         /etc/gconf/gconf.xml.defaults \
34
         /usr/X11R6/lib/X11/doc \
33
         /usr/X11R6/lib/X11/doc \
35
         /usr/share/vim/vim63/doc \
34
         /usr/share/vim/vim63/doc \
36
         /usr/share/vim/vim63/lang \
35
         /usr/share/vim/vim63/lang \
37
         /usr/share/emacs/21.3/etc/DOC-21.3.1 \
36
         /usr/share/emacs/21.3/etc/DOC-21.3.1 \
38
         /usr/share/pixmaps/nautilus \
37
         /usr/share/pixmaps/nautilus \
39
         /usr/share/cups \
38
         /usr/share/cups \
40
	 /usr/share/icons"
39
	 /usr/share/icons"
41
 
40
 
-
 
41
#        /var/lib/rpm \
-
 
42
 
42
### -----------------------------------------------------------
43
### -----------------------------------------------------------
43
### locales we don't need, we keep: en, de, fr
44
### locales we don't need, we keep: en, de, fr
44
### ----------------------------------------------------------- 
45
### ----------------------------------------------------------- 
45
 
46
 
46
### /usr/share/locale
47
### /usr/share/locale
47
### ----------------------------------------------------------- 
48
### ----------------------------------------------------------- 
48
 
49
 
49
# do we restore?
50
# do we restore?
50
if [ -d /mini/usr/share/locale/zh_TW.Big5 ]; then
51
if [ -d /mini/usr/share/locale/zh_TW.Big5 ]; then
51
    MOVE_LOCALE=$( find /mini/usr/share/locale/* -type d -maxdepth 0 \
52
    MOVE_LOCALE=$( find /mini/usr/share/locale/* -maxdepth 0 -type d  \
52
	      | while read f; do echo ${f##/mini}; done )
53
	      | while read f; do echo ${f##/mini}; done )
53
else
54
else
54
    MOVE_LOCALE=$( find /usr/share/locale/* -type d -maxdepth 0 \
55
    MOVE_LOCALE=$( find /usr/share/locale/* -maxdepth 0 -type d \
55
              | grep -v en | grep -v de | grep -v fr )
56
              | grep -v en | grep -v de | grep -v fr )
56
fi
57
fi
57
 
58
 
58
# add to FOLDERS
59
# add to FOLDERS
59
FOLDERS="$FOLDERS $MOVE_LOCALE"      
60
FOLDERS="$FOLDERS $MOVE_LOCALE"      
Line 61... Line 62...
61
### /usr/lib/locale
62
### /usr/lib/locale
62
### ----------------------------------------------------------- 
63
### ----------------------------------------------------------- 
63
 
64
 
64
# do we restore?
65
# do we restore?
65
if [ -d /mini/usr/lib/locale/zh_TW ]; then
66
if [ -d /mini/usr/lib/locale/zh_TW ]; then
66
    MOVE_LOCALE=$( find /mini/usr/lib/locale/* -type d -maxdepth 0 \
67
    MOVE_LOCALE=$( find /mini/usr/lib/locale/* -maxdepth 0 -type d  \
67
	      | while read f; do echo ${f##/mini}; done )
68
	      | while read f; do echo ${f##/mini}; done )
68
else
69
else
69
    MOVE_LOCALE=$( find /usr/lib/locale/* -type d -maxdepth 0 \
70
    MOVE_LOCALE=$( find /usr/lib/locale/* -maxdepth 0 -type d \
70
              | grep -v en | grep -v de | grep -v fr )
71
              | grep -v en | grep -v de | grep -v fr )
71
fi
72
fi
72
 
73
 
73
# add to FOLDERS
74
# add to FOLDERS
74
FOLDERS="$FOLDERS $MOVE_LOCALE"      
75
FOLDERS="$FOLDERS $MOVE_LOCALE"      
Line 76... Line 77...
76
### /usr/share/i18n/locales
77
### /usr/share/i18n/locales
77
### ----------------------------------------------------------- 
78
### ----------------------------------------------------------- 
78
 
79
 
79
# do we restore?
80
# do we restore?
80
if [ -d /mini/usr/share/i18n/locales/zh_TW ]; then
81
if [ -d /mini/usr/share/i18n/locales/zh_TW ]; then
81
    MOVE_LOCALE=$( find /mini/usr/share/i18n/locales/* -type f -maxdepth 0 \
82
    MOVE_LOCALE=$( find /mini/usr/share/i18n/locales/*  -maxdepth 0 -type f \
82
	      | while read f; do echo ${f##/mini}; done )
83
	      | while read f; do echo ${f##/mini}; done )
83
else
84
else
84
    MOVE_LOCALE=$( find /usr/share/i18n/locales/* -type f -maxdepth 0 \
85
    MOVE_LOCALE=$( find /usr/share/i18n/locales/*  -maxdepth 0 -type f \
85
              | grep -v en | grep -v de | grep -v fr | grep -v POSIX )
86
              | grep -v en | grep -v de | grep -v fr | grep -v POSIX )
86
fi
87
fi
87
 
88
 
88
# add to FOLDERS
89
# add to FOLDERS
89
FOLDERS="$FOLDERS $MOVE_LOCALE"      
90
FOLDERS="$FOLDERS $MOVE_LOCALE"      
Line 168... Line 169...
168
	ln -s emacs /usr/bin/emacs-21.3
169
	ln -s emacs /usr/bin/emacs-21.3
169
    fi
170
    fi
170
 
171
 
171
    ### run updatedb
172
    ### run updatedb
172
    echo "Run updatedb..."
173
    echo "Run updatedb..."
173
    . /etc/updatedb.conf
174
    . /etc/updatedb.conf 2>/dev/null
-
 
175
    rpm -q mlocate >/dev/null
-
 
176
    if [ "$?" = "0" ]; then
-
 
177
	/usr/bin/updatedb -e "/media /sfs /tmp /boot /livecd /home /net /trunk"
-
 
178
    else
174
    /usr/bin/updatedb -e /tmp,/boot,/livecd,/home,/mini,/net
179
	/usr/bin/updatedb -e /media,/tmp,/boot,/livecd,/home,/net,/trunk
-
 
180
    fi
175
    echo "done."
181
    echo "done."
176
 
182
 
177
    ### change init runlevel to 3
183
    ### change init runlevel to 3
178
    sed -i "s/id\:.\:initdefault/id\:3\:initdefault/" /etc/inittab
184
    sed -i "s/id\:.\:initdefault/id\:3\:initdefault/" /etc/inittab
179
 
185