diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-05-03 15:57:53 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-05-03 15:57:53 +0300 |
commit | eded02cfde6a48270b975d8390dac44b3ad22f35 (patch) | |
tree | f5aa20ddaade51615a4777a3642aadf2e4e546f7 /lynis | |
parent | eda79af419d4d61ab6cc078d0c8f74bb8c031b98 (diff) |
Rewritten counters and dealing with values
Diffstat (limited to 'lynis')
-rwxr-xr-x | lynis | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -620,7 +620,7 @@ ${NORMAL} LogText "Latest stable version : ${PROGRAM_LV}" if [ ${PROGRAM_LV} -gt ${PROGRAM_AC} ]; then # Check if current version is REALLY outdated (10 versions ago) - PROGRAM_MINVERSION=`expr ${PROGRAM_LV} - 10` + PROGRAM_MINVERSION=$((${PROGRAM_LV} - 10)) LogText "Minimum required version : ${PROGRAM_MINVERSION}" if [ ${PROGRAM_MINVERSION} -gt ${PROGRAM_AC} ]; then Display --indent 2 --text "- Program update status... " --result "WARNING" --color RED @@ -652,7 +652,7 @@ ${NORMAL} NOW=`date +%s` OLD_RELEASE=0 TIME_DIFFERENCE_CHECK=10368000 # 4 months - RELEASE_PLUS_TIMEDIFF=`expr ${PROGRAM_RELEASE_TIMESTAMP} + ${TIME_DIFFERENCE_CHECK}` + RELEASE_PLUS_TIMEDIFF=$((${PROGRAM_RELEASE_TIMESTAMP} + ${TIME_DIFFERENCE_CHECK})) if [ ${NOW} -gt ${RELEASE_PLUS_TIMEDIFF} ]; then # Show if release is old, only if we didn't show it with normal update check if [ ${UPDATE_AVAILABLE} -eq 0 ]; then @@ -757,7 +757,7 @@ ${NORMAL} if [ -f ${PLUGIN_FILE} ]; then FIND2=`grep "^# PLUGIN_NAME=" ${PLUGIN_FILE} | awk -F= '{ print $2 }'` if [ ! "${FIND2}" = "" -a ! "${FIND2}" = "[plugin_name]" ]; then - if [ ${PLUGIN_PHASE} -eq 1 ]; then N_PLUGIN=`expr ${N_PLUGIN} + 1`; fi + if [ ${PLUGIN_PHASE} -eq 1 ]; then N_PLUGIN=$((${N_PLUGIN} + 1)); fi # Check if the plugin is enabled in any of the profiles PLUGIN_ENABLED_STATE=0 for PROFILE in ${PROFILES}; do @@ -779,7 +779,7 @@ ${NORMAL} if [ "${FIND4}" = "rw-r--r--" -o "${FIND4}" = "rw-r-----" -o "${FIND4}" = "rw-------" -o "${FIND4}" = "r--------" ]; then LogText "Including plugin file: ${PLUGINFILE} (version: ${PLUGIN_VERSION})" Report "plugin_enabled_phase${PLUGIN_PHASE}[]=${FIND2}|${PLUGIN_VERSION}|" - if [ ${PLUGIN_PHASE} -eq 1 ]; then N_PLUGIN_ENABLED=`expr ${N_PLUGIN_ENABLED} + 1`; fi + if [ ${PLUGIN_PHASE} -eq 1 ]; then N_PLUGIN_ENABLED=$((${N_PLUGIN_ENABLED} + 1)); fi Display --indent 2 --text "- ${CYAN}Plugin${NORMAL}: ${WHITE}${FIND2}${NORMAL}" if [ ${PLUGIN_PHASE} -eq 1 ]; then Progress " ["; fi . ${PLUGINFILE} |