removed [[ TEST ]] && action form for if [[ TEST ]]; then action; fi for compatibility
This commit is contained in:
@@ -29,10 +29,10 @@ conf_mail()
|
||||
|
||||
precheck_conf_mail()
|
||||
{
|
||||
[[ -n $MAINDOM ]] && (
|
||||
if [[ -n $MAINDOM ]]; then
|
||||
prnt E "Aucun domaine principal renseigné."
|
||||
die 158
|
||||
)
|
||||
fi
|
||||
}
|
||||
|
||||
export -f conf_mail
|
||||
|
||||
@@ -19,12 +19,14 @@ export VER_install_desktop="0.0.2"
|
||||
|
||||
install_desktop()
|
||||
{
|
||||
[[ $X11_DRV ]] &&
|
||||
prnt I "Installation de pilotes supplémentaires X11..." &&
|
||||
if [[ -n $X11_DRV ]]; then
|
||||
prnt I "Installation de pilotes supplémentaires X11..."
|
||||
pkginst $X11_DRV
|
||||
[[ $UBUNTU_FLAVOR ]] &&
|
||||
prnt I "Installation de l'environnement $UBUNTU_FLAVOR..." &&
|
||||
fi
|
||||
if [[ $UBUNTU_FLAVOR ]]; then
|
||||
prnt I "Installation de l'environnement $UBUNTU_FLAVOR..."
|
||||
pkginst ${UBUNTU_FLAVOR}-desktop
|
||||
fi
|
||||
}
|
||||
|
||||
precheck_install_desktop()
|
||||
|
||||
@@ -25,14 +25,14 @@ install_mkagent()
|
||||
|
||||
precheck_install_mkagent()
|
||||
{
|
||||
[[ -n $MKVERSION ]] && (
|
||||
if [[ -n $MKVERSION ]]; then
|
||||
prnt E "Undeclared check_mk version of the agent to install."
|
||||
die 162
|
||||
)
|
||||
[[ -n $MK_SERVER ]] && (
|
||||
fi
|
||||
if [[ -n $MK_SERVER ]]; then
|
||||
prnt E "Undeclared check_mk server."
|
||||
die 162
|
||||
)
|
||||
fi
|
||||
}
|
||||
|
||||
export -f install_mkagent
|
||||
|
||||
@@ -18,9 +18,10 @@ export VER_install_pkg="0.1.1"
|
||||
install_pkg()
|
||||
{
|
||||
# Remove unnecessary packages
|
||||
[[ -n $PKGS_RMLIST ]] &&
|
||||
prnt I "Suppression de paquets supperflus..." &&
|
||||
if [[ -n $PKGS_RMLIST ]]; then
|
||||
prnt I "Suppression de paquets supperflus..."
|
||||
pkgrem $PKGS_RMLIST
|
||||
fi
|
||||
|
||||
# Blacklist some anoying packages (and remove them if needed)
|
||||
if [[ -n PKGS_BLACKLIST ]]; then
|
||||
@@ -36,10 +37,11 @@ install_pkg()
|
||||
fi
|
||||
|
||||
# Install all the configured packages
|
||||
[[ -n $PKGSEL ]] &&
|
||||
prnt I "Installation de la sélection de paquets..." &&
|
||||
if [[ -n $PKGSEL ]]; then
|
||||
prnt I "Installation de la sélection de paquets..."
|
||||
pkginst $PKGSEL
|
||||
|
||||
fi
|
||||
|
||||
# Cleaning
|
||||
prnt I "Suppression des paquets résiduels le cas échéant..."
|
||||
pkgautorem
|
||||
@@ -52,8 +54,11 @@ precheck_install_pkg()
|
||||
else
|
||||
prnt I "$(echo $PKGS_RMLIST | wc -w) paquets à supprimer."
|
||||
fi
|
||||
[[ -z PKGS_BLACKLIST ]] &&
|
||||
|
||||
if [[ -z PKGS_BLACKLIST ]]; then
|
||||
prnt W "Les paquets $pkg seront placés en liste noire !"
|
||||
fi
|
||||
|
||||
if [[ -z $PKGSEL ]]; then
|
||||
prnt W "Pas de paquet additionel à installer !"
|
||||
else
|
||||
|
||||
@@ -16,9 +16,10 @@ patch_snmp()
|
||||
/lib/systemd/system/snmpd.service /etc/init.d/snmpd
|
||||
installfile snmpd.conf /etc/snmp/snmpd.conf
|
||||
installfile snmpd.init /etc/init.d/snmpd
|
||||
[[ -e /lib/systemd/system/snmpd.service ]] &&
|
||||
installfile snmpd.service /lib/systemd/system/snmpd.service &&
|
||||
if [[ -e /lib/systemd/system/snmpd.service ]]; then
|
||||
installfile snmpd.service /lib/systemd/system/snmpd.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
svc_restart snmpd
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user