mirror of
https://github.com/CISOfy/lynis.git
synced 2026-03-11 08:55:28 +00:00
Allow automatic configuration of a setting
This commit is contained in:
parent
748039358c
commit
a45d6e61f8
1 changed files with 7 additions and 3 deletions
|
|
@ -80,19 +80,23 @@
|
|||
#read VALUE
|
||||
else
|
||||
Debug "Setting '${SETTING}' should be configured with value '${VALUE}'"
|
||||
FIND=$(grep "^${SETTING}" ${CUSTOM_PROFILE})
|
||||
if [ "${FIND}" = "" ]; then
|
||||
${ECHOCMD} "Configuring setting '${CYAN}${SETTING}${NORMAL}'"
|
||||
echo "${SETTING}=${VALUE}" >> ${CUSTOM_PROFILE}
|
||||
else
|
||||
${ECHOCMD} "${RED}Error${NORMAL}: Setting '${CYAN}${SETTING}${NORMAL}' was already configured:${NORMAL} ${WHITE}${FIND}${NORMAL}"
|
||||
fi
|
||||
fi
|
||||
# Now check if value is in line with expected type (boolean, integer, string)
|
||||
# =To be implemented=
|
||||
done
|
||||
${ECHOCMD} ""
|
||||
${ECHOCMD} "${YELLOW}Note${NORMAL}: ${WHITE}Automatic configuration not fully implemented yet.${NORMAL}"
|
||||
${ECHOCMD} ""
|
||||
ExitClean
|
||||
|
||||
fi
|
||||
|
||||
|
||||
ExitClean
|
||||
|
||||
|
||||
# The End
|
||||
|
|
|
|||
Loading…
Reference in a new issue