diff options
Diffstat (limited to 'lynis')
-rwxr-xr-x | lynis | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -34,7 +34,7 @@ PROGRAM_AUTHOR_CONTACT="lynis-dev@cisofy.com" # Version details - PROGRAM_RELEASE_DATE="2017-04-23" + PROGRAM_RELEASE_DATE="2017-04-30" PROGRAM_RELEASE_TIMESTAMP=1490800090 PROGRAM_RELEASE_TYPE="dev" # dev or final PROGRAM_VERSION="2.5.0" @@ -416,7 +416,7 @@ ${YELLOW}Note: ${WHITE}Cancelling the program can leave temporary files behind${ if [ ${WRONGOPTION} -eq 1 ]; then echo " ${RED}Error${NORMAL}: ${WHITE}Invalid option '${WRONGOPTION_value}'${NORMAL}" - else + else if [ ${VIEWHELP} -eq 0 ]; then echo " ${RED}No command provided.${WHITE} Exiting..${NORMAL}" echo "" @@ -572,13 +572,13 @@ ${NORMAL} if [ -z "${PLUGINDIR}" ]; then #LogText "Result: Searching for plugindir" tPLUGIN_TARGETS="/usr/local/lynis/plugins /usr/local/share/lynis/plugins /usr/share/lynis/plugins /etc/lynis/plugins ./plugins" - for I in ${tPLUGIN_TARGETS}; do - if [ -d ${I} -a -z "${PLUGINDIR}" ]; then - PLUGINDIR=${I} + for DIR in ${tPLUGIN_TARGETS}; do + if [ -d ${DIR} -a -z "${PLUGINDIR}" ]; then + PLUGINDIR=${DIR} Debug "Result: found plugindir ${PLUGINDIR}" fi done - else + else Debug "Plugin was already set before to ${PLUGINDIR} (most likely via program argument or profile)" fi @@ -706,9 +706,9 @@ ${NORMAL} fi # Test for older releases, without testing via update mechanism - if [ "$OS" = "Solaris" ]; then + if [ "${OS}" = "Solaris" ]; then NOW=$(nawk 'BEGIN{print srand()}') - else + else NOW=$(date "+%s") fi @@ -780,7 +780,7 @@ ${NORMAL} ################################################################################# # # Check for systemd presence - if [ -d /lib/systemd/system -a -f /usr/lib/systemd/systemd ]; then + if [ -d ${ROOTDIR}lib/systemd/system -a -f ${ROOTDIR}usr/lib/systemd/systemd ]; then LogText "Result: systemd is using systemd" HAS_SYSTEMD=1 Report "systemd=1" @@ -796,7 +796,7 @@ ${NORMAL} Display --indent 2 --text "- ${GEN_VERBOSE_MODE}" --result "YES" --color GREEN if IsDebug; then Display --indent 2 --text "- ${GEN_DEBUG_MODE}" --result "YES" --color GREEN - else + else Display --indent 2 --text "- ${GEN_DEBUG_MODE}" --result "NO" --color RED fi fi |