Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2019-03-04 14:33:03 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-03-04 14:33:03 +0300
commitf7a291a62f2e4747eb7624f06a0c34581cfb9f3f (patch)
tree18bbaa4963ef674f74e93483681f0d23095fca59 /include
parent9d8b12e0f8683d5a0c93dd0aac845241e464119e (diff)
Use datestamps instead of date, due to compatibility with other platforms
Diffstat (limited to 'include')
-rw-r--r--include/osdetection8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/osdetection b/include/osdetection
index ef105eba..069167bb 100644
--- a/include/osdetection
+++ b/include/osdetection
@@ -515,13 +515,11 @@
if [ ! -z "${OS_VERSION}" ]; then
if [ -f "${DBDIR}/software-eol.db" ]; then
FIND="${OS_FULLNAME}"
- EOL_DATE=$(awk -v value="${FIND}" -F: '{if ($1=="os" && value ~ $2){print $3}}' ${DBDIR}/software-eol.db | head -n 1)
- #EOL_DATE=$(grep "os:${FIND}" ${DBDIR}/software-eol.db | awk -F: '{print $3}' | head -n 1)
+ EOL_DATE=$(awk -v value="${FIND}" -F: '{if ($1=="os" && value ~ $2){print $4}}' ${DBDIR}/software-eol.db | head -n 1)
if [ ! -z "${EOL_DATE}" ]; then
NOW=$(date "+%s")
- FIND=$(date "+%s" --date=${EOL_DATE})
- if [ ! -z "${FIND}" ]; then
- if [ ${NOW} -gt ${FIND} ]; then
+ if [ ! -z "${NOW}" ]; then
+ if [ ${NOW} -gt ${EOL_DATE} ]; then
EOL=1
else
EOL=0