improved pkg_inst module (remove + blacklist), some small typoes
This commit is contained in:
@@ -7,10 +7,6 @@ export PROXYAPTPORT="3142"
|
||||
export PROXYSRV="proxy.legos.obs-mip.fr"
|
||||
export PROXYSRVPORT="3128"
|
||||
|
||||
# Paquets à enlever après installation
|
||||
export RMLIST="apparmor laptop-detect resolvconf"
|
||||
export APTBLACKLIST="apparmor chafa resolvconf"
|
||||
|
||||
# Langues supportés et langue du systême
|
||||
export LOCALESET="en_US.UTF-8 fr_FR.UTF-8"
|
||||
export SYSLOCALE="fr_FR.UTF-8"
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Liste de paquets pour installation
|
||||
|
||||
# Paquets à enlever après installation
|
||||
export PKGS_RMLIST="apparmor laptop-detect resolvconf snapd"
|
||||
|
||||
# Paquets dont l'installation est interdite
|
||||
export PKGS_BLACKLIST="apparmor resolvconf snapd"
|
||||
|
||||
# Base
|
||||
export PKGS_BASE="debconf-utils debhelper deborphan ethtool hardinfo \
|
||||
cpufrequtils hwinfo lm-sensors libatasmart-bin lsscsi pciutils \
|
||||
|
||||
8
init.sh
8
init.sh
@@ -189,6 +189,7 @@ exec 3>&1 4>&2
|
||||
trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||
exec > >(tee -a $LOGFILE)
|
||||
exec 2> >(tee -a $LOGFILE >&2)
|
||||
prnt I "Démarrage d'init version $VERSION."
|
||||
|
||||
# Récupère la configuration
|
||||
prnt I "Chargement de la configuration..."
|
||||
@@ -246,5 +247,12 @@ fi
|
||||
precheck_$mod
|
||||
done
|
||||
|
||||
# If we only checks, we stop here
|
||||
if [[ $CHECK_ONLY == true ]]; then
|
||||
prnt I "Mode de vérification seulement, on s'arrête là."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
prnt I "That's all folks !"
|
||||
#echo "Après vérification des logs, vous devriez redémarrer la machine..."
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# NTP
|
||||
|
||||
export VER_conf_ntp="0.0.4"
|
||||
export VER_conf_ntp="0.0.5"
|
||||
|
||||
conf_ntp()
|
||||
{
|
||||
@@ -15,7 +15,7 @@ conf_ntp()
|
||||
svc_stop ntp
|
||||
|
||||
prnt I "Installation du fichier de configuration de NTP."
|
||||
dest="/etc/ntp.conf.work"
|
||||
local dest="/etc/ntp.conf.work"
|
||||
backupdist /etc/ntp.conf
|
||||
installfile ntp.conf $dest
|
||||
local line=""
|
||||
|
||||
@@ -1,20 +1,40 @@
|
||||
# Installation des paquets
|
||||
|
||||
export VER_install_pkg="0.0.2"
|
||||
export VER_install_pkg="0.1.0"
|
||||
|
||||
install_pkg()
|
||||
{
|
||||
[[ $PKGSEL ]] &&
|
||||
[[ -n $PKGS_RMLIST ]] &&
|
||||
prnt I "Suppression de paquets supperflus..." &&
|
||||
pkgrem $PKGS_RMLIST
|
||||
|
||||
if [[ -n PKGS_BLACKLIST ]]; then
|
||||
for pkg in $PKGS_BLACKLIST; do
|
||||
prnt I "Mise du paquet $pkg en liste noire..."
|
||||
local dest=/usr/apt/apt.conf.d/blacklist_$pkg.conf
|
||||
installfile blacklist.conf $dest &&
|
||||
sed -i -e "s/@pkg@/pkg/" $dest
|
||||
done
|
||||
fi
|
||||
|
||||
[[ -n $PKGSEL ]] &&
|
||||
prnt I "Installation de la sélection de paquets..." &&
|
||||
pkginst $PKGSEL
|
||||
}
|
||||
|
||||
precheck_install_pkg()
|
||||
{
|
||||
if [[ -z PKGS_RMLIST ]]; then
|
||||
prnt I "Aucun paquet à désinstaller"
|
||||
else
|
||||
prnt I "$(echo $PKGS_RMLIST | wc -w) paquets à supprimer."
|
||||
fi
|
||||
[[ -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 !"
|
||||
else
|
||||
prnt I "$(echo $PKGSEL | wc -w) paquets additionels seront installés"
|
||||
prnt I "$(echo $PKGSEL | wc -w) paquets additionels seront installés."
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
3
repo/common/blacklist.conf
Normal file
3
repo/common/blacklist.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
Package: #pkg#
|
||||
Pin: release *
|
||||
Pin-Priority: -1
|
||||
Reference in New Issue
Block a user