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:
authorKevin <kevin.klopfenstein@bedag.ch>2020-02-21 10:04:08 +0300
committerKevin <kevin.klopfenstein@bedag.ch>2020-02-21 10:06:24 +0300
commit42b2831f758cd5a229a4615f1ffc8a500394ebd4 (patch)
treee7ffae9a284e41ef7efaa5190d6bf395117e8faa /include
parentd81cc71790144ed9ff354748254d300d297f3da6 (diff)
add basic xbps/void support
Diffstat (limited to 'include')
-rw-r--r--include/binaries1
-rw-r--r--include/functions3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/binaries b/include/binaries
index f567ed1f..0eaf6acb 100644
--- a/include/binaries
+++ b/include/binaries
@@ -154,6 +154,7 @@
docker) DOCKERBINARY="${BINARY}"; LogText " Found known binary: docker (container technology) - ${BINARY}" ;;
domainname) DOMAINNAMEBINARY="${BINARY}"; LogText " Found known binary: domainname (NIS domain) - ${BINARY}" ;;
dpkg) DPKGBINARY="${BINARY}"; LogText " Found known binary: dpkg (package management) - ${BINARY}" ;;
+ xbps-query) XBPSBINARY="${BINARY}"; LogText " Found known binary: xbps (package management) - ${BINARY}" ;;
egrep) EGREPBINARY=${BINARY}; LogText " Found known binary: egrep (text search) - ${BINARY}" ;;
equery) EQUERYBINARY="${BINARY}"; LogText " Found known binary: query (package manager) - ${BINARY}" ;;
exim) EXIMBINARY="${BINARY}"; EXIMVERSION=$(${BINARY} -bV | grep 'Exim version' | awk '{ print $3 }' | xargs); LogText " Found known binary ${BINARY} (version ${EXIMVERSION})" ;;
diff --git a/include/functions b/include/functions
index de40a427..7b31cdc3 100644
--- a/include/functions
+++ b/include/functions
@@ -2050,6 +2050,9 @@
elif [ -n "${ZYPPERBINARY}" ]; then
output=$(${ZYPPERBINARY} --quiet --non-interactive search --installed -i ${package} 2> /dev/null | grep "^i")
if [ -n "${output}" ]; then exit_code=0; else exit_code=1; fi
+ elif [ -n "${XBPSBINARY}" ]; then
+ output=$(${XBPSBINARY} ${package} 2> /dev/null | ${GREPBINARY} "^ii")
+ exit_code=$?
else
ReportException "PackageIsInstalled:01"
fi