Subversion Repositories ALCASAR

Rev

Rev 2757 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2757 Rev 2758
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-urpmi.sh 2757 2019-10-31 17:59:21Z rexy $
2
# $Id: alcasar-urpmi.sh 2758 2019-11-03 23:17:20Z 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 gnupg ulogd pm-fallback-policy ipset cronie-anacron usbutils locales-en usb_modeswitch tinyproxy vnstat php-gd sudo iftop man dos2unix p7zip bc msec kernel-userspace-headers kernel-firmware-nonfree dnsmasq dhcp-server netcat-traditional gammu wkhtmltopdf"
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"
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 225... Line 225...
225
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
225
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
226
# Clean the RPM cache
226
# Clean the RPM cache
227
urpmi --clean
227
urpmi --clean
228
# the ipt-netflow RPM add the kernel module ipt_NETFLOW (the modules dependance tree need to be updated)
228
# the ipt-netflow RPM add the kernel module ipt_NETFLOW (the modules dependance tree need to be updated)
229
/sbin/depmod -a
229
/sbin/depmod -a
-
 
230
# test if all needed rpms are correctly installed
-
 
231
count_pkg=0; nb_pkg=0;
-
 
232
for pkg in $PACKAGES
-
 
233
do
-
 
234
	nb_pkg=`expr $nb_pkg + 1`	
-
 
235
	if rpm -q --quiet $pkg ; then
-
 
236
		count_pkg=`expr $count_pkg + 1`
-
 
237
	else
-
 
238
		echo "error installing $pkg"
-
 
239
	fi		
-
 
240
done
-
 
241
if [ $count_pkg -ne $nb_pkg ]
-
 
242
then
-
 
243
	exit 1
-
 
244
fi
-
 
245
# test if all custom rpms are correctly installed
-
 
246
#count_pkg=0; nb_pkg=0;
-
 
247
#for pkg in `ls rpms/$ARCH/|tr -d .rpm`
-
 
248
#do
-
 
249
#	nb_pkg=`expr $nb_pkg + 1`	
-
 
250
#	if rpm -q --quiet $pkg ; then
-
 
251
#		count_pkg=`expr $count_pkg + 1`
-
 
252
#	else
-
 
253
#		echo "error installing $pkg"
-
 
254
#	fi		
-
 
255
#done
-
 
256
#if [ $count_pkg -ne $nb_pkg ]
-
 
257
#then
-
 
258
#	exit 1
-
 
259
#fi
230
# fix some RPM versions
260
# fix some RPM versions
231
echo "/^kernel/" > /etc/urpmi/skip.list
261
echo "/^kernel/" > /etc/urpmi/skip.list
232
echo "/^freeradius/" >> /etc/urpmi/skip.list
262
echo "/^freeradius/" >> /etc/urpmi/skip.list
233
exit 0
263
exit 0