mirror of
https://github.com/ovh/debian-cis.git
synced 2025-06-22 02:33:42 +02:00
2.19_disable_freevxfs.sh 2.20_disable_jffs2.sh 2.21_disable_hfs.sh 2.22_disable_hfsplus.sh 2.23_disable_squashfs.sh 2.24_disable_udf.sh
This commit is contained in:
@ -7,12 +7,17 @@
|
||||
|
||||
is_kernel_option_enabled() {
|
||||
local KERNEL_OPTION=$1
|
||||
RESULT=$(zgrep -i $KERNEL_OPTION /proc/config.gz | grep -vE "^#")
|
||||
RESULT=$(zgrep -i $KERNEL_OPTION /proc/config.gz | grep -vE "^#") || :
|
||||
ANSWER=$(cut -d = -f 2 <<< $RESULT)
|
||||
if [ "x$ANSWER" = "xy" ]; then
|
||||
debug "Kernel option $KERNEL_OPTION enabled"
|
||||
FNRET=0
|
||||
else
|
||||
elif [ "x$ANSWER" = "xn" ]; then
|
||||
debug "Kernel option $KERNEL_OPTION disabled"
|
||||
FNRET=1
|
||||
else
|
||||
debug "Kernel option $KERNEL_OPTION not found"
|
||||
FNRET=2 # Not found
|
||||
fi
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user