mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-26 07:21:22 +01:00
Change src/skel to allow setting CIS_ROOT_DIR in env and not just sourcing /etc/default/cis-hardening. Making the whole lib more versatile.
This commit is contained in:
parent
3b7a2b8216
commit
161ffa56a7
16
src/skel
16
src/skel
@ -27,15 +27,15 @@ check_config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# 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
|
||||||
fi
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Main function, will call the proper functions given the configuration (audit, enabled, disabled)
|
# Main function, will call the proper functions given the configuration (audit, enabled, disabled)
|
||||||
[ -r $CIS_ROOT_DIR/lib/main.sh ] && . $CIS_ROOT_DIR/lib/main.sh
|
[ -r "$CIS_ROOT_DIR"/lib/main.sh ] && . $CIS_ROOT_DIR/lib/main.sh
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user