Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1206 → Rev 1207

/scripts/alcasar-urpmi.sh
11,8 → 11,11
Lang=`echo $LANG|cut -c 1-2`
VERSION="2"
ARCH="i586"
# The kernel version we compile netflow for
KERNEL="kernel-desktop-3.4.45-1.mga2-1-1.mga2"
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
PACKAGES="sudo freeradius freeradius-mysql freeradius-ldap freeradius-web apache-mpm-prefork apache-mod_ssl apache-mod_php iptables squid dansguardian postfix mariadb logwatch ntp bind-utils openssh-server php-xml php-ldap php-mysql pam_ccreds rng-utils dnsmasq syslinux rsync cronie-anacron clamav pm-fallback-policy php-mbstring perl-rrdtool perl-MailTools perl-Socket6 php-sockets kernel-desktop-3.4.45-1.mga2-1-1.mga2 fail2ban"
PACKAGES="sudo freeradius freeradius-mysql freeradius-ldap freeradius-web apache-mpm-prefork apache-mod_ssl apache-mod_php iptables squid dansguardian postfix mariadb logwatch ntp bind-utils openssh-server php-xml php-ldap php-mysql pam_ccreds rng-utils dnsmasq syslinux rsync cronie-anacron clamav pm-fallback-policy php-mbstring perl-rrdtool perl-MailTools perl-Socket6 php-sockets fail2ban"
 
rpm_repository_sync ()
{
cat <<EOF > /etc/urpmi/urpmi.cfg
135,16 → 138,29
fi
done
# delete unused RPMs
echo "Cleaning the system : "
if [ $Lang == "fr" ]
then
echo "Cleaning the system : "
else
echo "Nettoyage du système : "
fi
for rm_rpm in shorewall mandi radeontool avahi
do
/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
echo -n "."
done
echo
# download RPM in cache
# 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
echo "Récupération des paquetages de mise à jour. Veuillez patienter ..."
echo "Il est temps d'aller prendre un café (ou une bonne bière) ;-)"
else
214,11 → 230,20
rpm_error
exit 1
fi
# Keep only the kernel version we compil netflow with, and remove all others
kernelVersion=$(rpm -qa | grep "kernel-desktop")
for i in $kernelVersion
do
if [ ! $i = $KERNEL ];then
urpme --auto $i
fi
done
# delete old alcasar RPMs and unused services
for rm_rpm in c-icap-server lib64chilli0 libchilli0 python-coova-chilli cyrus-sasl mageia-gfxboot-theme
do
/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
done
 
# Save chilli launch script (erase with new rpm one)
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
# Install home made RPMs
228,19 → 253,4
# Clean the RPM cache
urpmi --clean
 
#Keep only kernel-desktop-3.4.45-1.mga2-1-1.mga2 version, and remove all others
kernelVersion=$(rpm -qa | grep "kernel-desktop")
for i in $kernelVersion
do
if [ ! $i = "kernel-desktop-3.4.45-1.mga2-1-1.mga2" ];then
urpme $i
fi
done
 
#Fix the kernel version to : kernel-desktop-3.4.45-1.mga2-1-1.mga2
echo "/^kernel-desktop/" > /etc/urpmi/skip.list
 
#update tht kernel modules list
depmod -a
 
exit 0