Subversion Repositories ALCASAR

Rev

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

Rev 1983 Rev 1985
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-urpmi.sh 1983 2016-07-08 10:14:42Z raphael.pion $
2
# $Id: alcasar-urpmi.sh 1985 2016-07-08 17:33:09Z 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 12... Line 12...
12
VERSION="5"
12
VERSION="5"
13
ARCH="i586" 
13
ARCH="i586" 
14
# The kernel version we compile netflow for
14
# The kernel version we compile netflow for
15
KERNEL="kernel-server-4.4.13-1.mga5-1-1.mga5"
15
KERNEL="kernel-server-4.4.13-1.mga5-1-1.mga5"
16
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
16
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
17
PACKAGES="vim-enhanced freeradius freeradius-mysql freeradius-ldap apache apache-mod_ssl apache-mod_php dansguardian postfix mariadb ntp bind-utils openssh-server php-xml php-ldap php-mysql php-mysqli php-mbstring php-sockets php-cli php-curl php-pdo_sqlite php-json rng-utils rsync clamav perl-rrdtool perl-MailTools perl-Socket6 fail2ban gnupg ulogd pm-fallback-policy ipset cronie-anacron gammu usbutils locales-en usb_modeswitch tinyproxy vnstat php-gd sudo iftop man"
17
PACKAGES="vim-enhanced freeradius freeradius-mysql freeradius-ldap apache apache-mod_ssl apache-mod_php dansguardian postfix mariadb ntp bind-utils openssh-server php-xml php-ldap php-mysql php-mysqli php-mbstring php-sockets php-cli php-curl php-pdo_sqlite php-json rng-utils rsync clamav perl-rrdtool perl-MailTools perl-Socket6 fail2ban gnupg ulogd pm-fallback-policy ipset cronie-anacron gammu usbutils locales-en usb_modeswitch tinyproxy vnstat php-gd sudo iftop man kernel-firmware-nonfree"
18
 
18
 
19
rpm_repository_sync ()
19
rpm_repository_sync ()
20
{
20
{
21
cat <<EOF > /etc/urpmi/urpmi.cfg
21
cat <<EOF > /etc/urpmi/urpmi.cfg
22
{
22
{
Line 24... Line 24...
24
}
24
}
25
EOF
25
EOF
26
echo ${!MIRRORLIST}
26
echo ${!MIRRORLIST}
27
urpmi.addmedia core --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/core/release
27
urpmi.addmedia core --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/core/release
28
urpmi.addmedia core-updates --update --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/core/updates
28
urpmi.addmedia core-updates --update --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/core/updates
29
urpmi.addmedia non-free --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/nonfree/release
29
urpmi.addmedia nonfree --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/nonfree/release
-
 
30
urpmi.addmedia nonfree-updates --update --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/nonfree/updates
30
}
31
}
31
 
32
 
32
rpm_error ()
33
rpm_error ()
33
{
34
{
34
echo
35
echo
Line 75... Line 76...
75
	#                       For Europeans 
76
	#                       For Europeans 
76
	MIRRORLIST1="http://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/$VERSION/$ARCH"
77
	MIRRORLIST1="http://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/$VERSION/$ARCH"
77
	#                       For International install
78
	#                       For International install
78
	MIRRORLIST2="http://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
79
	MIRRORLIST2="http://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
79
	try_nb="0"; nb_repository="0"
80
	try_nb="0"; nb_repository="0"
80
	while [ "$nb_repository" != "3" ]
81
	while [ "$nb_repository" != "4" ]
81
	do
82
	do
82
		try_nb=`expr $try_nb + 1`
83
		try_nb=`expr $try_nb + 1`
83
		MIRRORLIST="MIRRORLIST$try_nb"
84
		MIRRORLIST="MIRRORLIST$try_nb"
84
		rpm_repository_sync 
85
		rpm_repository_sync 
85
		nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l`
86
		nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l`
86
		if [ "$nb_repository" != "3" ]
87
		if [ "$nb_repository" != "4" ]
87
		then
88
		then
88
			if [ $Lang == "fr" ]
89
			if [ $Lang == "fr" ]
89
			then	
90
			then	
90
				echo "Une erreur a été détectée lors de la synchronisation avec le dépot N°$try_nb."
91
				echo "Une erreur a été détectée lors de la synchronisation avec le dépot N°$try_nb."
91
			else
92
			else