mirror of https://github.com/CISOfy/lynis.git
Add pkg_info to PackageIsInstalled
The `pkg_info` command is used on a system using NetBSD pkgsrc to determine which packages are installed.
This commit is contained in:
parent
2b1d5fa46f
commit
eb7dbab1ee
|
@ -2041,6 +2041,9 @@
|
|||
elif [ -n "${PKG_BINARY}" ]; then
|
||||
output=$(${PKG_BINARY} -N info ${package} >/dev/null 2>&1)
|
||||
exit_code=$? # 0=package installed, 70=invalid package
|
||||
elif [ -n "${PKGINFOBINARY}" ]; then
|
||||
output=$(${PKGINFOBINARY} -q -e ${package} >/dev/null 2>&1)
|
||||
exit_code=$? # 0=package installed, 1=package not installed
|
||||
elif [ -n "${RPMBINARY}" ]; then
|
||||
output=$(${RPMBINARY} --quiet -q ${package} > /dev/null 2>&1)
|
||||
exit_code=$?
|
||||
|
|
Loading…
Reference in New Issue