mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-26 07:21:22 +01:00
Changing CIS_ROOT_DIR management in env in bin/hardening.sh
This commit is contained in:
parent
161ffa56a7
commit
119d532a7f
@ -22,7 +22,7 @@ AUDIT_ALL=0
|
|||||||
AUDIT_ALL_ENABLE_PASSED=0
|
AUDIT_ALL_ENABLE_PASSED=0
|
||||||
ALLOW_SERVICE_LIST=0
|
ALLOW_SERVICE_LIST=0
|
||||||
SET_HARDENING_LEVEL=0
|
SET_HARDENING_LEVEL=0
|
||||||
CIS_ROOT_DIR=''
|
#CIS_ROOT_DIR=''
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@ -136,15 +136,13 @@ while [[ $# > 0 ]]; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Source Root Dir Parameter
|
# Source Root Dir Parameter
|
||||||
if [ ! -r /etc/default/cis-hardening ]; then
|
if [ -r /etc/default/cis-hardening ]; then
|
||||||
echo "There is no /etc/default/cis-hardening file, cannot source CIS_ROOT_DIR variable, aborting"
|
|
||||||
exit 128
|
|
||||||
else
|
|
||||||
. /etc/default/cis-hardening
|
. /etc/default/cis-hardening
|
||||||
if [ -z $CIS_ROOT_DIR ]; then
|
fi
|
||||||
echo "No CIS_ROOT_DIR variable, aborting"
|
if [ -z "$CIS_ROOT_DIR" ]; then
|
||||||
|
echo "There is no /etc/default/cis-hardening file nor cis-hardening directory in current environment."
|
||||||
|
echo "Cannot source CIS_ROOT_DIR variable, aborting."
|
||||||
exit 128
|
exit 128
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -r $CIS_ROOT_DIR/lib/constants.sh ] && . $CIS_ROOT_DIR/lib/constants.sh
|
[ -r $CIS_ROOT_DIR/lib/constants.sh ] && . $CIS_ROOT_DIR/lib/constants.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user