diff --git a/.gitignore b/.gitignore index 203e3fb..418340b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ log - +.README.md.kate-swp diff --git a/README.txt b/README.txt index b19fd33..39cdabf 100644 --- a/README.txt +++ b/README.txt @@ -1,2 +1,4 @@ This is ubuntu deployment scripts for LEGOS git repository created on 2021-05-31-11:31:04 + +Check README.md for details. diff --git a/modules/install_pkg.sh b/modules/install_pkg.sh index 32fcdb0..0f85b0a 100644 --- a/modules/install_pkg.sh +++ b/modules/install_pkg.sh @@ -35,8 +35,8 @@ install_pkg() # Install all the configured packages [[ -n $PKGSEL ]] && - prnt I "Installation de la sélection de paquets..." && - pkginst $PKGSEL + prnt I "Installation de la sélection de paquets..." && + pkginst $PKGSEL } precheck_install_pkg() @@ -49,9 +49,9 @@ precheck_install_pkg() [[ -z PKGS_BLACKLIST ]] && prnt W "Les paquets $pkg seront placés en liste noire !" if [[ -z $PKGSEL ]]; then - prnt W "Pas de paquet additionel à installer !" + prnt W "Pas de paquet additionel à installer !" else - prnt I "$(echo $PKGSEL | wc -w) paquets additionels seront installés." + prnt I "$(echo $PKGSEL | wc -w) paquets additionels seront installés." fi } diff --git a/modules/upgrade_dist.sh b/modules/upgrade_dist.sh index f5afe48..bf9952c 100644 --- a/modules/upgrade_dist.sh +++ b/modules/upgrade_dist.sh @@ -1,6 +1,13 @@ -# Distribution upgrade module, should be ran prior any other module +# ------------------------------------------------------------------------------ +# Distribution upgrade module, should be ran prior any other module (also +# configure APT) +# ------------------------------------------------------------------------------ +# Variable: +# * PROXYAPT: Proxy to use with APT (eg. APT Cacher) +# * PROXYAPTPORT: Working port for APT proxy +# ------------------------------------------------------------------------------ -export VER_upgrade_dist="0.0.5" +export VER_upgrade_dist="0.0.6" upgrade_dist() { @@ -8,17 +15,17 @@ upgrade_dist() prnt I "Configuration du proxy pour APT..." if [[ $PROXYAPT ]]; then - if [[ ! -d $(basedir $proxyfile) ]]; then - mkdir -pv /etc/apt/apt.conf.d || ( - prnt E "Impossiblle de créer le répertoire d'accueil pour la configuration d'APT." - exit 10 - ) - fi - backupdist $proxyfile - echo "# Generated automatically on $(stdtime) by $0" > $proxyfile - echo "Acquire::http::Proxy \"http://${PROXYAPT}:${PROXYAPTPORT}\";" >> $proxyfile + if [[ ! -d $(basedir $proxyfile) ]]; then + mkdir -pv /etc/apt/apt.conf.d || ( + prnt E "Impossiblle de créer le répertoire d'accueil pour la configuration d'APT." + exit 10 + ) + fi + backupdist $proxyfile + echo "# Generated automatically on $(stdtime) by $0" > $proxyfile + echo "Acquire::http::Proxy \"http://${PROXYAPT}:${PROXYAPTPORT}\";" >> $proxyfile else - prnt I "Pas de proxy configuré, ne fait rien." + prnt I "Pas de proxy configuré, ne fait rien." fi prnt I "Mise à jour de la liste des paquets..." @@ -32,10 +39,10 @@ upgrade_dist() precheck_upgrade_dist() { prnt I "Vérification du réseau..." - wget -q --tries=10 --timeout=20 --spider http://google.com + wget -q --tries=10 --timeout=20 --spider http://www.cnrs.fr if [[ ! $? -eq 0 ]]; then - prnt E "Réseau non fonctionnel ! Abandon." - die 5 + prnt E "Réseau non fonctionnel ! Abandon." + die 5 fi if [[ -n $PROXYAPT && -z $PROXYAPTPORT ]]; then prnt E "Un serveur proxy a été spécifié mais pas son port d'usage."