11,8 → 11,11 |
Lang=`echo $LANG|cut -c 1-2` |
VERSION="5" |
ARCH="i586" |
# The kernel version we compile netflow for |
KERNEL="kernel-server-4.1.15-2.mga5-1-1.mga5" |
ModuleTree="kernel-server-4.1.15-2.mga5" |
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ****** |
PACKAGES="vim-enhanced 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-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 dkms-ipt_NETFLOW iptables-NETFLOW pm-fallback-policy ipset cronie-anacron gammu usbutils locales-en usb_modeswitch tinyproxy vnstat php-gd sudo iftop" |
PACKAGES="vim-enhanced 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-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" |
|
rpm_repository_sync () |
{ |
38,6 → 41,7 |
echo "If this problem occurs again, change the MIRRORLIST[1&2] variables in the file 'scripts/alcasar-urpmi.sh'" |
fi |
} |
|
# extract the current Mageia version and hardware architecture (i586 ou X64) |
fic=`cat /etc/product.id` |
old="$IFS" |
59,8 → 63,10 |
fi |
done |
IFS="$old" |
|
# We prefer wget than curl |
urpmi --no-verify-rpm --auto conf/rpms/$ARCH/wget*.rpm |
|
# Set the RPM repository (if not already set) |
ACTIVE_REPO=`cat /etc/urpmi/urpmi.cfg|grep "mageia.org"|wc -l` |
if [ "$ACTIVE_REPO" != "2" ] |
109,6 → 115,17 |
fi |
done |
fi |
|
# download the kernel used by ALCASAR and fix its version |
if [ $Lang == "fr" ] |
then |
echo "Récupération du noyau Linux exploité par ALCASAR. Veuillez patienter ..." |
else |
echo "Download the Linux kernel used by ALCASAR. Please wait ..." |
fi |
urpmi --auto --quiet $KERNEL |
echo "/^kernel/" > /etc/urpmi/skip.list |
|
# download updated RPM in cache |
if [ $Lang == "fr" ] |
then |
131,6 → 148,7 |
rpm_error |
exit 1 |
fi |
|
# update with cached RPM |
urpmi --auto --auto-update |
if [ "$?" != "0" ] |
147,6 → 165,7 |
fi |
# Clean the RPM cache |
urpmi --clean |
|
# Download of ALCASAR specifics RPM in cache (and test) |
if [ $Lang == "fr" ] |
then |
167,6 → 186,7 |
rpm_error |
exit 1 |
fi |
|
# update with cached RPM |
urpmi --auto $PACKAGES |
if [ "$?" != "0" ] |
181,6 → 201,16 |
rpm_error |
exit 1 |
fi |
|
# Keep only the kernel version we compil netflow with, and remove all others |
kernelVersion=$(rpm -qa | grep "^kernel-") |
for i in $kernelVersion |
do |
if [ ! $i = $KERNEL ];then |
urpme --auto $i |
fi |
done |
|
# delete unused RPMs |
if [ $Lang == "fr" ] |
then |
188,7 → 218,7 |
else |
echo "Nettoyage du système : " |
fi |
for rm_rpm in shorewall mandi radeontool avahi mageia-gfxboot-theme privoxy cpupower squid gamin |
for rm_rpm in shorewall mandi avahi mageia-gfxboot-theme privoxy cpupower squid gamin |
do |
/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null |
echo -n "." |