Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 531 → Rev 532

/scripts/alcasar-urpmi.sh
5,6 → 5,8
 
VERSION="2010.2"
ARCH="i586"
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
PACKAGES="freeradius freeradius-mysql freeradius-ldap freeradius-web apache-mpm-prefork apache-mod_ssl apache-mod_php squid dansguardian postfix MySQL logwatch ntp awstats mondo cdrecord buffer vim-enhanced bind-utils wget arpscan ulogd openssh-server php-xml pam_ccreds rng-utils lsb-release dnsmasq sudo cronie-anacron pciutils clamav pm-fallback-policy"
 
rpm_repository_sync ()
{
11,12 → 13,19
echo ${!MIRRORLIST}
urpmi.removemedia -a
urpmi.addmedia --wget --probe-synthesis --mirrorlist ${!MIRRORLIST} main /media/main/release
urpmi --auto wget
urpmi.addmedia --wget --update --probe-synthesis --mirrorlist ${!MIRRORLIST} main_updates /media/main/updates
urpmi.addmedia --wget --probe-synthetis --mirrorlist ${!MIRRORLIST} contrib /media/contrib/release
urpmi.addmedia --wget --probe-synthesis --mirrorlist ${!MIRRORLIST} contrib /media/contrib/release
urpmi.addmedia --wget --update --probe-synthesis --mirrorlist ${!MIRRORLIST} contrib_updates /media/contrib/updates
}
 
rpm_error ()
{
echo
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'"
echo "Try an other install later."
echo "If this problem occurs again, change the MIRRORLIST[1&2] variables in the file 'scripts/alcasar-urpmi.sh'"
}
# extract the current Mandriva version and hardware architecture (i586 ou X64)
fic=`cat /etc/product.id`
old="$IFS"
42,6 → 51,8
fi
done
IFS="$old"
# We prefer wget than curl
urpmi --no-verify-rpm conf/rpms/$ARCH/wget*.rpm
# Set the RPM repository
MIRROR_NBR=2
# For french ALCASARistes
61,11 → 72,7
echo "An error occurs when synchronising the repositories N°$try_nb"
if [ $(expr $try_nb) -eq $MIRROR_NBR ]
then
echo
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'"
echo "Try an other install later."
echo "If this problem occurs again, change the MIRRORLIST[1&2] variables in the file 'scripts/alcasar-urpmi.sh'"
rpm_error
exit 1
fi
echo "Voulez-vous tenter une synchronisation avec un autre dépôt?"
92,16 → 99,40
then
echo
echo "Une erreur a été détectée lors de la récupération des paquetages."
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'"
echo "An error occurs when downloading"
echo "Try an other install later."
echo "If this problem occurs again, change the MIRRORLIST[1&2] variables in the file 'scripts/alcasar-urpmi.sh'"
rpm_error
exit 1
fi
# update with cached RPM
urpmi --auto --auto-update
# cleaning
urpme --auto --auto-orphans
# Download of ALCASAR specifics RPM in cache (and test)
echo "Récupération des paquetages complémentaires. Veuillez patienter ..."
echo "Download of complementary packages. Please wait ..."
urpmi --downloader=wget --auto $PACKAGES --quiet --test --retry 2
if [ "$?" != "0" ]
then
echo
echo "Une erreur a été détectée lors de la récupération des paquetages complémentaires."
echo "An error occurs when downloading complementary packages"
rpm_error
exit 1
fi
# update with cached RPM
urpmi --auto $PACKAGES
# On supprime les paquetages inutiles
for rm_rpm in shorewall dhcp-server c-icap-server cyrus-sasl distcache-server avahi mandi radeontool
do
/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
echo -n "."
done
# On installe les RPMs spécifiques à la version
urpmi --no-verify --auto conf/rpms/$ARCH/*.rpm
# On empêche les mises à jour de coova-chilli et freeradius par le biais des dépôts
for rpmskip in coova freeradius
do
echo -n "/^$rpmskip/" >> /etc/urpmi/skip.list
done
# Clean the RPM cache
urpmi --clean
exit 0