mirror of https://github.com/CISOfy/lynis.git
Better display when multiple items are to be configured
This commit is contained in:
parent
c42a1d4083
commit
6f1be4c82a
|
@ -76,6 +76,7 @@
|
|||
SETTING=$(echo ${I} | awk -F= '{print $1}')
|
||||
VALUE=$(echo ${I} | awk -F= '{print $2}')
|
||||
if [ "${VALUE}" = "" ]; then
|
||||
${ECHOCMD} "Profile: ${CUSTOM_PROFILE}"
|
||||
Debug "Did not find a value configured on the command line for setting ${SETTING}"
|
||||
#read VALUE
|
||||
else
|
||||
|
@ -84,12 +85,11 @@
|
|||
if [ "${FIND}" = "" ]; then
|
||||
${ECHOCMD} "Configuring setting '${CYAN}${SETTING}${NORMAL}'"
|
||||
echo "${SETTING}=${VALUE}" >> ${CUSTOM_PROFILE}
|
||||
if [ $? -eq 0 ]; then ${ECHOCMD} "${GREEN}Setting changed${NORMAL}"; fi
|
||||
else
|
||||
${ECHOCMD} "${YELLOW}Notice${NORMAL}: Setting '${CYAN}${SETTING}${NORMAL}' was already configured (not changed)${NORMAL}"
|
||||
${ECHOCMD} " Current value: ${WHITE}${FIND}${NORMAL}"
|
||||
${ECHOCMD} ""
|
||||
${ECHOCMD} "${RED}Error${NORMAL}: Setting '${CYAN}${SETTING}${NORMAL}' was already configured${NORMAL}"
|
||||
${ECHOCMD} ""
|
||||
${ECHOCMD} "Profile: ${CUSTOM_PROFILE}"
|
||||
${ECHOCMD} "Current value: ${WHITE}${FIND}${NORMAL}"
|
||||
fi
|
||||
fi
|
||||
# Now check if value is in line with expected type (boolean, integer, string)
|
||||
|
|
Loading…
Reference in New Issue