--- lxc_install.sh.old 2012-04-04 10:17:33.998225482 +0200 +++ lxc_install.sh 2012-04-04 10:39:07.413613073 +0200 @@ -19,6 +19,7 @@ FSTAB_FILE="$ROOTLXC/$NAME/fstab" LOG="/var/log/isolation.log" TMPL="/usr/share/eole/creole/distrib" +CONFFILE="/etc/eole/lxc_install.conf" rm -f $LOG function execute() { $1 >> $LOG 2>&1 @@ -96,11 +97,21 @@ echo "deb file:///cdrom/ubuntu lucid main multiverse universe local" > /etc/apt/sources.list source="file:///cdrom/ubuntu/" else - source="http://archive.ubuntu.com/ubuntu/" - #network test (darkhole test) - #le timeout est à 15 secds (#3234) - wget --timeout=15 $source -O /dev/null 2>/dev/null - if [ $? -ne 0 ];then + #utilise sources dans l'ordre archive.ubuntu.com, la variable creole + #serveur_maj ou la variable "sources" du fichier CONFFILE (#3183) + sources="http://archive.ubuntu.com/ubuntu/" + if [ -e /etc/eole/config.eol ]; then + . /usr/bin/ParseDico + [ ! "$serveur_maj" = "" ] && sources=$serveur_maj + fi + [ -e $CONFFILE ] && . $CONFFILE + for source in $sources; then + #network test (darkhole test) + #le timeout est à 15 secds (#3234) + wget --timeout=15 $source -O /dev/null 2>/dev/null + [ $? = 0 ] && test_network="ok" && break + fi + if [ ! "$test_network" = "ok" ]; then echo "Impossible d'accéder au réseau vérifiez vos paramètres" #On nettoie sinon erreur au prochain reconfigure rm -rf $ROOT