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