Fix a bug of 8.0

This commit is contained in:
Samson-W 2019-08-09 15:44:50 +08:00
parent d614bdde72
commit 8c9e91dab3
2 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,8 @@
#!/bin/bash
#
# harbian audit 7/8/9 Hardening
# harbian audit 7/8/9/10 or CentOS Hardening
# todo 7.7.* need test for CentOS
#
#
@ -19,6 +20,7 @@ HARDENING_LEVEL=2
# Do as you want, but this script does not handle this
PACKAGES='iptables iptables-persistent'
PACKAGES_REDHAT='iptables nftables firewalld'
SERVICENAME='netfilter-persistent'
# This function will be called if the script status is on enabled / audit mode

View File

@ -20,7 +20,7 @@ KERNEL_OPTION="CONFIG_AUDIT"
# This function will be called if the script status is on enabled / audit mode
audit () {
is_kernel_option_enabled "^$KERNEL_OPTION="
is_kernel_option_enabled $KERNEL_OPTION
if [ $FNRET = 0 ]; then # 0 means true in bash, so it IS activated
ok "$KERNEL_OPTION is enabled"
else
@ -31,7 +31,7 @@ audit () {
# This function will be called if the script status is on enabled mode
apply () {
is_kernel_option_enabled "^$KERNEL_OPTION="
is_kernel_option_enabled $KERNEL_OPTION
if [ $FNRET = 0 ]; then # 0 means true in bash, so it IS activated
ok "$KERNEL_OPTION is enabled"
else