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:13:47 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-03-04 14:13:47 +0300
commit9d8b12e0f8683d5a0c93dd0aac845241e464119e (patch)
tree0b1fc7c32928e5ae4832c36120fe504299e34c81
parente0b93ed0cc5ed00d7fb76a55c9f0dd1b31a3ac2e (diff)
Initial lookup with awk corrected
-rw-r--r--include/osdetection4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/osdetection b/include/osdetection
index 83ba2312..ef105eba 100644
--- a/include/osdetection
+++ b/include/osdetection
@@ -515,8 +515,8 @@
if [ ! -z "${OS_VERSION}" ]; then
if [ -f "${DBDIR}/software-eol.db" ]; then
FIND="${OS_FULLNAME}"
- # Does not work on FreeBSD: EOL_DATE=$(awk -v value="${FIND}" -F: '{if ($1=="os" && $2 ~ value){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 $3}}' ${DBDIR}/software-eol.db | head -n 1)
+ #EOL_DATE=$(grep "os:${FIND}" ${DBDIR}/software-eol.db | awk -F: '{print $3}' | head -n 1)
if [ ! -z "${EOL_DATE}" ]; then
NOW=$(date "+%s")
FIND=$(date "+%s" --date=${EOL_DATE})