Use echo when checking parameters to prevent incorrect issues with screen output

This commit is contained in:
mboelen 2016-03-30 14:26:01 +02:00
parent 4d52e64b2a
commit 70bb10328f
1 changed files with 12 additions and 12 deletions

View File

@ -38,8 +38,8 @@
case $2 in
"dockerfile")
if [ "$3" = "" ]; then
Display --text "${RED}Error: ${WHITE}Missing file name or URL${NORMAL}"
Display --text "Example: lynis audit dockerfile /root/Dockerfile"
echo "${RED}Error: ${WHITE}Missing file name or URL${NORMAL}"
echo "Example: lynis audit dockerfile /root/Dockerfile"
ExitFatal
else
shift; shift
@ -58,11 +58,11 @@
;;
esac
else
Display --text "${RED}Error: ${WHITE}Need a target to audit${NORMAL}"
Display --text " "
Display --text "Examples:"
Display --text "lynis audit dockerfile"
Display --text "lynis audit system"
echo --text "${RED}Error: ${WHITE}Need a target to audit${NORMAL}"
echo --text " "
echo --text "Examples:"
echo --text "lynis audit dockerfile"
echo --text "lynis audit system"
ExitFatal
fi
#break
@ -81,11 +81,11 @@
HELPER_PARAMS="$1 $2"
break
else
Display --text "${RED}Error: ${WHITE}Need a target for update${NORMAL}"
Display --text " "
Display --text "Examples:"
Display --text "lynis update info"
Display --text "lynis update release"
echo "${RED}Error: ${WHITE}Need a target for update${NORMAL}"
echo " "
echo "Examples:"
echo "lynis update info"
echo "lynis update release"
ExitFatal
fi
;;