Subversion Repositories ALCASAR

Rev

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

Rev 1349 Rev 1350
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-urpmi.sh 1349 2014-05-14 14:52:19Z richard $
2
# $Id: alcasar-urpmi.sh 1350 2014-05-14 16:14:43Z 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 ipset postfix mariadb ntp bind-utils openssh-server php-mysqli 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 pm-fallback-policy gammu usbutils locales-en "
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 89... Line 89...
89
	fi
89
	fi
90
	exit 1
90
	exit 1
91
fi
91
fi
92
# We prefer wget than curl
92
# We prefer wget than curl
93
urpmi --no-verify-rpm --auto conf/rpms/$ARCH/wget*.rpm
93
urpmi --no-verify-rpm --auto conf/rpms/$ARCH/wget*.rpm
94
# Set the RPM repository
94
# Set the RPM repository (if not already set)
-
 
95
ACTIVE_REPO=`cat /etc/urpmi/urpmi.cfg|grep key-ids|wc -l`
-
 
96
if [ "$ACTIVE_REPO" != "2" ]
-
 
97
	then
95
MIRROR_NBR=2
98
	MIRROR_NBR=2
96
#                       For Europeans 
99
	#                       For Europeans 
97
MIRRORLIST1="http://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/$VERSION/$ARCH"
100
	MIRRORLIST1="http://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/$VERSION/$ARCH"
98
#                       For International install
101
	#                       For International install
99
MIRRORLIST2="http://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
102
	MIRRORLIST2="http://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
Line 133... Line 136...
133
		then
136
			then
134
			exit 1
137
			exit 1
135
		fi
138
			fi
136
	fi
139
		fi
137
done
140
	done
138
 
141
fi
139
# download updated RPM in cache 
142
# download updated RPM in cache 
140
if [ $Lang == "fr" ]
143
if [ $Lang == "fr" ]
141
then	
144
then	
142
	echo "Récupération des paquetages de mise à jour. Veuillez patienter ..."
145
	echo "Récupération des paquetages de mise à jour. Veuillez patienter ..."
143
	echo "Il est temps d'aller prendre un café (ou une bonne bière) ;-)"
146
	echo "Il est temps d'aller prendre un café (ou une bonne bière) ;-)"