40,7 → 40,6 |
} |
# extract the current Mageia version and hardware architecture (i586 ou X64) |
fic=`cat /etc/product.id` |
unknown_os=0 |
old="$IFS" |
IFS="," |
set $fic |
49,46 → 48,17 |
if [ "`echo $i|grep distribution|cut -d'=' -f1`" == "distribution" ] |
then |
DISTRIBUTION=`echo $i|cut -d"=" -f2` |
unknown_os=`expr $unknown_os + 1` |
fi |
if [ "`echo $i|grep version|cut -d'=' -f1`" == "version" ] |
then |
CURRENT_VERSION=`echo $i|cut -d"=" -f2` |
unknown_os=`expr $unknown_os + 1` |
fi |
if [ "`echo $i|grep arch|cut -d'=' -f1`" == "arch" ] |
then |
ARCH=`echo $i|cut -d"=" -f2` |
unknown_os=`expr $unknown_os + 1` |
fi |
done |
IFS="$old" |
if [[ ( $unknown_os != 3 || "$DISTRIBUTION" != "Mageia" ) && ( "$CURRENT_VERSION" != "4" ) ]] |
then |
if [ $Lang == "fr" ] |
then |
echo "L'installation ou la mise @ jour d'ALCASAR ne peut pas être réalisée." |
echo "Le système d'exploitation doit être remplacé (Mageia4)" |
else |
echo "The automatic update of ALCASAR can't be performed." |
echo "The OS must be replaced (Mageia4)" |
fi |
if [ -e /tmp/alcasar-conf.tar.gz ] |
then |
echo |
if [ $Lang == "fr" ] |
then |
echo "1 - Récupérez le fichier de configuration actuel (/tmp/alcasar-conf.tar.gz)." |
echo "2 - Installez Linux-Mageia4 (cf. doc d'installation)" |
echo "3 - copiez le fichier 'alcasar-conf.tar.gz' dans le répertoire '/tmp' avant de lancer l'installation d'ALCASAR" |
else |
echo "1 - Retrieve the configuration file (/tmp/alcasar-conf.tar.gz)" |
echo "2 - Install Linux-Mageia4 (cf. installation doc)" |
echo "3 - Copy the file 'alcasar-conf.tar.gz' in the folder '/tmp' before launching the installation of ALCASAR" |
fi |
fi |
exit 1 |
fi |
# We prefer wget than curl |
urpmi --no-verify-rpm --auto conf/rpms/$ARCH/wget*.rpm |
# Set the RPM repository (if not already set) |