Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2453 → Rev 2454

/scripts/alcasar-urpmi.sh
5,12 → 5,12
# by 3abtux and Rexy
# This script is distributed under the Gnu General Public License (GPL)
 
# script de mise en place des dépots RPM
# script de mise en place des dépots RPM
# configure the RPM repository
 
Lang=`echo $LANG|cut -c 1-2`
VERSION="6"
ARCH="x86_64"
ARCH="x86_64"
# The kernel version we compile netflow for
KERNEL="kernel-server-4.9.56-1.mga6-1-1.mga6"
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
34,7 → 34,7
{
echo
if [ $Lang == "fr" ]
then
then
echo "Relancez l'installation ultérieurement."
echo "Si vous rencontrez à nouveau ce problème, modifier les variables MIRRORLIST[1&2] du fichier 'scripts/alcasar-urpmi.sh'"
else
51,15 → 51,15
for i in $*
do
if [ "`echo $i|grep distribution|cut -d'=' -f1`" == "distribution" ]
then
then
DISTRIBUTION=`echo $i|cut -d"=" -f2`
fi
if [ "`echo $i|grep version|cut -d'=' -f1`" == "version" ]
then
then
CURRENT_VERSION=`echo $i|cut -d"=" -f2`
fi
if [ "`echo $i|grep arch|cut -d'=' -f1`" == "arch" ]
then
then
ARCH=`echo $i|cut -d"=" -f2`
fi
done
71,7 → 71,7
# Set the RPM repository (if not already set)
ACTIVE_REPO=`cat /etc/urpmi/urpmi.cfg|grep "mageia.org"|wc -l`
MIRROR_NBR=2
# For Europeans
# For Europeans
MIRRORLIST1="http://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/$VERSION/$ARCH"
# For International install
MIRRORLIST2="http://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
80,12 → 80,12
do
try_nb=`expr $try_nb + 1`
MIRRORLIST="MIRRORLIST$try_nb"
rpm_repository_sync
rpm_repository_sync
nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l`
if [ "$nb_repository" != "4" ]
then
if [ $Lang == "fr" ]
then
then
echo "Une erreur a été détectée lors de la synchronisation avec le dépot N°$try_nb."
else
echo "An error occurs when synchronising the repositories N°$try_nb"
96,7 → 96,7
exit 1
fi
if [ $Lang == "fr" ]
then
then
echo "Voulez-vous tenter une synchronisation avec un autre dépôt ? (O/n)"
else
echo "Do you wan't to try a synchronisation with an other repository? (Y/n)"
107,7 → 107,7
do
read response
done
if [ "$response" = "n" ] || [ "$response" = "N" ]
if [ "$response" = "n" ] || [ "$response" = "N" ]
then
exit 1
fi
116,7 → 116,7
 
# download the kernel used by ALCASAR and fix its version
if [ $Lang == "fr" ]
then
then
echo "Récupération du noyau Linux exploité par ALCASAR. Veuillez patienter ..."
else
echo "Download the Linux kernel used by ALCASAR. Please wait ..."
123,9 → 123,9
fi
echo "/^kernel/" > /etc/urpmi/skip.list
urpmi --auto --quiet $KERNEL
# download updated RPM in cache
# download updated RPM in cache
if [ $Lang == "fr" ]
then
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
137,7 → 137,7
then
echo
if [ $Lang == "fr" ]
then
then
echo "Une erreur a été détectée lors de la récupération des paquetages."
else
echo "An error occurs when downloading RPMS"
152,7 → 152,7
then
echo
if [ $Lang == "fr" ]
then
then
echo "Une erreur a été détectée lors de la mise à jour des paquetages."
else
echo "An error occurs when updating packages"
165,7 → 165,7
 
# Download of ALCASAR specifics RPM in cache (and test)
if [ $Lang == "fr" ]
then
then
echo "Récupération des paquetages complémentaires. Veuillez patienter ..."
else
echo "Download of complementary packages. Please wait ..."
175,7 → 175,7
then
echo
if [ $Lang == "fr" ]
then
then
echo "Une erreur a été détectée lors de la récupération des paquetages complémentaires."
else
echo "An error occurs when downloading complementary packages"
185,12 → 185,12
fi
 
# update with cached RPM
urpmi --auto $PACKAGES
urpmi --auto $PACKAGES
if [ "$?" != "0" ]
then
echo
if [ $Lang == "fr" ]
then
then
echo "Une erreur a été détectée lors de l'installation des paquetages complémentaires."
else
echo "An error occurs when installing complementary packages"