Subversion Repositories ALCASAR

Rev

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

Rev 2760 Rev 2761
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-urpmi.sh 2760 2019-11-06 12:26:49Z lucas.echard $
2
# $Id: alcasar-urpmi.sh 2761 2019-11-07 23:01:36Z rexy $
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="7"
12
VERSION="7"
13
ARCH="x86_64"
13
ARCH="x86_64"
14
# The kernel version we compile netflow for
14
# The kernel version we compile netflow for
15
KERNEL="kernel-server-5.3.7-4.mga7-1-1.mga7"
15
KERNEL="kernel-server-5.3.7-4.mga7-1-1.mga7"
16
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
16
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
17
PACKAGES="arp-scan vim-enhanced freeradius freeradius-mysql freeradius-ldap lighttpd lighttpd-mod_auth php-fpm unbound e2guardian postfix mariadb ntp bind-utils openssh-server php-xml php-ldap 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 gnupg2 ulogd pm-fallback-policy ipset cronie-anacron usbutils locales-en usb_modeswitch tinyproxy vnstat php-gd sudo iftop dos2unix p7zip bc msec kernel-userspace-headers kernel-firmware-nonfree dnsmasq dhcp-server netcat-traditional gammu wkhtmltopdf"
17
PACKAGES="vim-enhanced freeradius freeradius-mysql freeradius-ldap lighttpd lighttpd-mod_auth php-fpm php-gd php-ldap php-mysqli php-mbstring php-sockets php-curl php-pdo_sqlite unbound e2guardian postfix mariadb ntp bind-utils openssh-server rng-utils rsync clamav perl-rrdtool perl-MailTools fail2ban gnupg2 ulogd pm-fallback-policy ipset usb_modeswitch tinyproxy vnstat dos2unix p7zip msec kernel-userspace-headers kernel-firmware-nonfree dnsmasq dhcp-server gammu wkhtmltopdf"
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 111... Line 111...
111
		then
111
		then
112
			exit 1
112
			exit 1
113
		fi
113
		fi
114
	fi
114
	fi
115
done
115
done
116
 
-
 
-
 
116
# fix some RPM versions
-
 
117
echo "/^kernel/" > /etc/urpmi/skip.list
-
 
118
echo "/^freeradius/" >> /etc/urpmi/skip.list
117
# download the kernel used by ALCASAR
119
# download the kernel used by ALCASAR
118
if [ $Lang == "fr" ]
120
if [ $Lang == "fr" ]
119
then
121
then
120
	echo "Récupération du noyau Linux exploité par ALCASAR. Veuillez patienter ..."
122
	echo "Récupération du noyau Linux exploité par ALCASAR. Veuillez patienter ..."
121
else
123
else
Line 167... Line 169...
167
then
169
then
168
	echo "Récupération des paquetages complémentaires. Veuillez patienter ..."
170
	echo "Récupération des paquetages complémentaires. Veuillez patienter ..."
169
else
171
else
170
	echo "Download of complementary packages. Please wait ..."
172
	echo "Download of complementary packages. Please wait ..."
171
fi
173
fi
172
urpmi --auto $PACKAGES --quiet --test --retry 2
174
urpmi --auto --no-recommends $PACKAGES --quiet --test --retry 2
173
if [ "$?" != "0" ]
175
if [ "$?" != "0" ]
174
then
176
then
175
	echo
177
	echo
176
	if [ $Lang == "fr" ]
178
	if [ $Lang == "fr" ]
177
	then
179
	then
Line 182... Line 184...
182
	rpm_error
184
	rpm_error
183
	exit 1
185
	exit 1
184
fi
186
fi
185
 
187
 
186
# update with cached RPM
188
# update with cached RPM
187
urpmi --auto $PACKAGES
189
urpmi --auto --no-recommends $PACKAGES
188
if [ "$?" != "0" ]
190
if [ "$?" != "0" ]
189
then
191
then
190
	echo
192
	echo
191
	if [ $Lang == "fr" ]
193
	if [ $Lang == "fr" ]
192
	then
194
	then
Line 255... Line 257...
255
#done
257
#done
256
#if [ $count_pkg -ne $nb_pkg ]
258
#if [ $count_pkg -ne $nb_pkg ]
257
#then
259
#then
258
#	exit 1
260
#	exit 1
259
#fi
261
#fi
260
# fix some RPM versions
-
 
261
echo "/^kernel/" > /etc/urpmi/skip.list
-
 
262
echo "/^freeradius/" >> /etc/urpmi/skip.list
-
 
-
 
262
 
263
exit 0
263
exit 0