Subversion Repositories ALCASAR

Rev

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

Rev 1336 Rev 1342
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-urpmi.sh 1336 2014-04-28 17:07:37Z richard $
2
# $Id: alcasar-urpmi.sh 1342 2014-05-06 10:10:39Z 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 9... Line 9...
9
# configure the RPM repository
9
# configure the RPM repository
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
# The kernel version we compile netflow for
-
 
15
#KERNEL="kernel-desktop-3.4.52-1.mga2-1-1.mga2"
-
 
16
#ModuleTree="kernel-desktop-3.4.52-1.mga2"
-
 
17
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
14
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
18
PACKAGES="freeradius freeradius-mysql freeradius-ldap freeradius-web apache apache-mod_ssl apache-mod_php iptables squid 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"
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"
19
 
16
 
20
rpm_repository_sync ()
17
rpm_repository_sync ()
21
{
18
{
22
cat <<EOF > /etc/urpmi/urpmi.cfg
19
cat <<EOF > /etc/urpmi/urpmi.cfg
23
{
20
{
Line 149... Line 146...
149
for rm_rpm in shorewall mandi radeontool mesa avahi 
146
for rm_rpm in shorewall mandi radeontool mesa avahi 
150
do
147
do
151
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
148
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
152
	echo -n "."
149
	echo -n "."
153
done
150
done
154
# download the kernel used by ALCASAR and fix its version
-
 
155
#if [ $Lang == "fr" ]
-
 
156
#then	
-
 
157
#	echo "Récupération du noyau Linux exploité par ALCASAR. Veuillez patienter ..."
-
 
158
#else
-
 
159
#	echo "Download the Linux kernel used by ALCASAR. Please wait ..."
-
 
160
#fi
-
 
161
#urpmi --auto --quiet $KERNEL
-
 
162
#echo "/^kernel/" > /etc/urpmi/skip.list
-
 
163
# download "timezone" to avoid a mageia issue  --> should be remove with mageia3
-
 
164
#urpmi timezone
-
 
165
# download updated RPM in cache 
151
# download updated RPM in cache 
166
if [ $Lang == "fr" ]
152
if [ $Lang == "fr" ]
167
then	
153
then	
168
	echo "Récupération des paquetages de mise à jour. Veuillez patienter ..."
154
	echo "Récupération des paquetages de mise à jour. Veuillez patienter ..."
169
	echo "Il est temps d'aller prendre un café (ou une bonne bière) ;-)"
155
	echo "Il est temps d'aller prendre un café (ou une bonne bière) ;-)"
Line 232... Line 218...
232
		echo "An error occurs when installing complementary packages"
218
		echo "An error occurs when installing complementary packages"
233
	fi
219
	fi
234
	rpm_error
220
	rpm_error
235
	exit 1
221
	exit 1
236
fi
222
fi
237
# Keep only the last kernel version
-
 
238
#kernelVersion=$(rpm -qa | grep "kernel-desktop")
-
 
239
#for i in $kernelVersion
-
 
240
#do
-
 
241
#	if [ ! $i = $KERNEL ];then
-
 
242
#		urpme --auto $i
-
 
243
#	fi
-
 
244
#done
-
 
245
echo "STOP"; read a
-
 
246
# delete unused services
223
# delete unused services
247
for rm_rpm in c-icap-server mageia-gfxboot-theme
224
for rm_rpm in mageia-gfxboot-theme
248
do
225
do
249
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
226
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
250
done
227
done
251
 
228
 
252
# Save chilli launch script (erase with new rpm one)
229
# Save chilli launch script (erase with new rpm one)
Line 255... Line 232...
255
urpmi --no-verify --auto conf/rpms/$ARCH/*.rpm
232
urpmi --no-verify --auto conf/rpms/$ARCH/*.rpm
256
# restore chilli launch script
233
# restore chilli launch script
257
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
234
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
258
# Clean the RPM cache
235
# Clean the RPM cache
259
urpmi --clean
236
urpmi --clean
260
 
-
 
261
exit 0
237
exit 0