Subversion Repositories ALCASAR

Rev

Rev 1342 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 1342 Rev 1348
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-urpmi.sh 1342 2014-05-06 10:10:39Z richard $
2
# $Id: alcasar-urpmi.sh 1348 2014-05-13 22:13:45Z richard $
3
 
3
 
4
# alcasar-urpmi.sh
4
# alcasar-urpmi.sh
5
# by 3abtux and Rexy
5
# by 3abtux and Rexy
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 10... Line 10...
10
 
10
 
11
Lang=`echo $LANG|cut -c 1-2`
11
Lang=`echo $LANG|cut -c 1-2`
12
VERSION="4"
12
VERSION="4"
13
ARCH="i586" 
13
ARCH="i586" 
14
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
14
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
15
PACKAGES="freeradius freeradius-mysql freeradius-ldap freeradius-web apache apache-mod_ssl apache-mod_php dansguardian postfix mariadb ntp bind-utils openssh-server php-xml php-ldap php-mysql php-mbstring php-sockets rng-utils dnsmasq rsync clamav pm-fallback-policy perl-rrdtool perl-MailTools perl-Socket6 fail2ban gnupg man ipset ulogd"
15
PACKAGES="freeradius freeradius-mysql freeradius-ldap freeradius-web apache apache-mod_ssl apache-mod_php dansguardian postfix mariadb ntp bind-utils openssh-server php-xml php-ldap php-mysql php-mbstring php-sockets rng-utils dnsmasq rsync clamav perl-rrdtool perl-MailTools perl-Socket6 fail2ban gnupg ulogd man"
16
 
16
 
17
rpm_repository_sync ()
17
rpm_repository_sync ()
18
{
18
{
19
cat <<EOF > /etc/urpmi/urpmi.cfg
19
cat <<EOF > /etc/urpmi/urpmi.cfg
20
{
20
{
Line 134... Line 134...
134
			exit 1
134
			exit 1
135
		fi
135
		fi
136
	fi
136
	fi
137
done
137
done
138
 
138
 
139
# delete unused RPMs
-
 
140
if [ $Lang == "fr" ]
-
 
141
then
-
 
142
	echo "Cleaning the system : "
-
 
143
else
-
 
144
	echo "Nettoyage du système : "
-
 
145
fi
-
 
146
for rm_rpm in shorewall mandi radeontool mesa avahi 
-
 
147
do
-
 
148
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
-
 
149
	echo -n "."
-
 
150
done
-
 
151
# download updated RPM in cache 
139
# download updated RPM in cache 
152
if [ $Lang == "fr" ]
140
if [ $Lang == "fr" ]
153
then	
141
then	
154
	echo "Récupération des paquetages de mise à jour. Veuillez patienter ..."
142
	echo "Récupération des paquetages de mise à jour. Veuillez patienter ..."
155
	echo "Il est temps d'aller prendre un café (ou une bonne bière) ;-)"
143
	echo "Il est temps d'aller prendre un café (ou une bonne bière) ;-)"
Line 218... Line 206...
218
		echo "An error occurs when installing complementary packages"
206
		echo "An error occurs when installing complementary packages"
219
	fi
207
	fi
220
	rpm_error
208
	rpm_error
221
	exit 1
209
	exit 1
222
fi
210
fi
223
# delete unused services
211
# delete unused RPMs
-
 
212
if [ $Lang == "fr" ]
-
 
213
then
-
 
214
	echo "Cleaning the system : "
-
 
215
else
-
 
216
	echo "Nettoyage du système : "
-
 
217
fi
224
for rm_rpm in mageia-gfxboot-theme
218
for rm_rpm in shorewall mandi radeontool avahi mageia-gfxboot-theme
225
do
219
do
226
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
220
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
-
 
221
	echo -n "."
227
done
222
done
228
 
223
 
229
# Save chilli launch script (erase with new rpm one)
224
# Save chilli launch script (erase with new rpm one)
230
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
225
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
231
# Install home made RPMs
226
# Install home made RPMs