IMP: mark some checks as useless

This commit is contained in:
Thibault Ayanides
2021-01-21 11:21:18 +01:00
committed by Thibault Serti
parent bd4ddfc398
commit ed1baa724e
10 changed files with 77 additions and 16 deletions

View File

@ -17,14 +17,32 @@ HARDENING_LEVEL=3
# shellcheck disable=2034
DESCRIPTION="Disable NIS Server."
PACKAGES='nis'
# This function will be called if the script status is on enabled / audit mode
audit() {
:
for PACKAGE in $PACKAGES; do
is_pkg_installed "$PACKAGE"
if [ "$FNRET" = 0 ]; then
crit "$PACKAGE is installed!"
else
ok "$PACKAGE is absent"
fi
done
}
# This function will be called if the script status is on enabled mode
apply() {
:
for PACKAGE in $PACKAGES; do
is_pkg_installed "$PACKAGE"
if [ "$FNRET" = 0 ]; then
crit "$PACKAGE is installed, purging it"
apt-get purge "$PACKAGE" -y
apt-get autoremove -y
else
ok "$PACKAGE is absent"
fi
done
}
# This function will check config parameters required