Optimizational function for 8.3.3 8.3.6

This commit is contained in:
Samson-W 2019-05-22 01:36:37 +08:00
parent 25c083a731
commit eea44e5124
2 changed files with 30 additions and 6 deletions

View File

@ -14,17 +14,29 @@ set -u # One variable unset, it's over
HARDENING_LEVEL=3
SERVICE_NAME="syslog-ng"
PACKAGE_R='rsyslog'
# This function will be called if the script status is on enabled / audit mode
audit () {
info "Ensure default and local facilities are preserved on the system"
info "No measure here, please review the file by yourself"
is_pkg_installed $PACKAGE_R
if [ $FNRET = 0 ]; then
ok "$PACKAGE_R has installed, so pass."
FNRET=0
else
info "Ensure default and local facilities are preserved on the system"
info "No measure here, please review the file by yourself"
fi
}
# This function will be called if the script status is on enabled mode
apply () {
info "Ensure default and local facilities are preserved on the system"
info "No measure here, please review the file by yourself"
is_pkg_installed $PACKAGE_R
if [ $FNRET = 0 ]; then
ok "$PACKAGE_R has installed, so pass."
else
info "Ensure default and local facilities are preserved on the system"
info "No measure here, please review the file by yourself"
fi
}
# This function will check config parameters required

View File

@ -12,15 +12,27 @@ set -e # One error, it's over
set -u # One variable unset, it's over
HARDENING_LEVEL=3
PACKAGE_R='rsyslog'
# This function will be called if the script status is on enabled / audit mode
audit () {
info "Not implemented yet"
is_pkg_installed $PACKAGE_R
if [ $FNRET = 0 ]; then
ok "$PACKAGE_R has installed, so pass."
FNRET=0
else
info "Not implemented yet"
fi
}
# This function will be called if the script status is on enabled mode
apply () {
info "Not implemented yet"
is_pkg_installed $PACKAGE_R
if [ $FNRET = 0 ]; then
ok "$PACKAGE_R has installed, so pass."
else
info "Not implemented yet"
fi
}
# This function will check config parameters required