mirror of https://github.com/CISOfy/lynis.git
Style improvements
This commit is contained in:
parent
263c0b558b
commit
fb88bcaf1f
|
@ -108,9 +108,8 @@
|
|||
if [ "${CUSTOM_URL_APPEND}" = "" ]; then CUSTOM_URL_APPEND="/"; fi
|
||||
|
||||
# Show warnings from logfile
|
||||
SWARNINGS=`grep -i 'warning:' ${LOGFILE} | sed 's/ /!space!/g'`
|
||||
|
||||
if [ "${SWARNINGS}" = "" ]; then
|
||||
SWARNINGS=$(${GREPBINARY} -i 'warning:' ${LOGFILE} | sed 's/ /!space!/g')
|
||||
if [ -z "${SWARNINGS}" ]; then
|
||||
echo " ${OK}Great, no warnings${NORMAL}"; echo ""
|
||||
else
|
||||
echo " ${WARNING}Warnings${NORMAL} (${TOTAL_WARNINGS}):"
|
||||
|
@ -131,7 +130,7 @@
|
|||
echo " ${RED}!${NORMAL} ${SHOWWARNING}"
|
||||
if [ ! "${DETAILS}" = "-" ]; then echo " - Details : ${CYAN}${DETAILS}${NORMAL}"; fi
|
||||
if [ ${SHOW_REPORT_SOLUTION} -eq 1 -a ! "${SOLUTION}" = "-" ]; then echo " - Solution : ${SOLUTION}"; fi
|
||||
if [ "${IS_CUSTOM}" = "" ]; then
|
||||
if [ -z "${IS_CUSTOM}" ]; then
|
||||
echo " ${CONTROL_URL_PROTOCOL}://${CONTROL_URL_PREPEND}${ADDLINK}${CONTROL_URL_APPEND}"
|
||||
else
|
||||
echo " ${CUSTOM_URL_PROTOCOL}://${CUSTOM_URL_PREPEND}${ADDLINK}${CUSTOM_URL_APPEND}"
|
||||
|
@ -150,9 +149,9 @@
|
|||
echo " ${WHITE}----------------------------${NORMAL}"
|
||||
for SUGGESTION in ${SSUGGESTIONS}; do
|
||||
SOLUTION=""
|
||||
SHOWSUGGESTION=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: //' | sed 's/\[details:\(.*\)\] \[solution:\(.*\)\]//' | sed 's/test://'`
|
||||
ADDLINK=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[test://' | sed 's/\]\(.*\)]//'`
|
||||
DETAILS=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[details://' | sed 's/\]\(.*\)]//'`
|
||||
SHOWSUGGESTION=$(echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: //' | sed 's/\[details:\(.*\)\] \[solution:\(.*\)\]//' | sed 's/test://')
|
||||
ADDLINK=$(echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[test://' | sed 's/\]\(.*\)]//')
|
||||
DETAILS=$(echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[details://' | sed 's/\]\(.*\)]//')
|
||||
SUGGESTION_PIECES=$(echo ${SUGGESTION} | sed 's/\[/ [/g')
|
||||
for PIECE in ${SUGGESTION_PIECES}; do
|
||||
if [ -z "${SOLUTION}" ]; then
|
||||
|
@ -164,7 +163,7 @@
|
|||
echo " ${YELLOW}*${NORMAL} ${SHOWSUGGESTION}"
|
||||
if [ ! "${DETAILS}" = "-" ]; then echo " - Details : ${CYAN}${DETAILS}${NORMAL}"; fi
|
||||
if [ ${SHOW_REPORT_SOLUTION} -eq 1 -a ! "${SOLUTION}" = "-" ]; then echo " - Solution : ${SOLUTION}"; fi
|
||||
if [ "${IS_CUSTOM}" = "" ]; then
|
||||
if [ -z "${IS_CUSTOM}" ]; then
|
||||
echo " ${GRAY}${CONTROL_URL_PROTOCOL}://${CONTROL_URL_PREPEND}${ADDLINK}${CONTROL_URL_APPEND}${NORMAL}"
|
||||
else
|
||||
echo " ${GRAY}${CUSTOM_URL_PROTOCOL}://${CUSTOM_URL_PREPEND}${ADDLINK}${CUSTOM_URL_APPEND}${NORMAL}"
|
||||
|
|
Loading…
Reference in New Issue