mirror of https://github.com/CISOfy/lynis.git
Added Slackware support for PackageIsInstalled() function
This commit is contained in:
parent
59a3c4b536
commit
051052cc15
|
@ -2086,6 +2086,10 @@
|
|||
elif [ -n "${PKGINFOBINARY}" ]; then
|
||||
output=$(${PKGINFOBINARY} -q -e ${package} >/dev/null 2>&1)
|
||||
exit_code=$? # 0=package installed, 1=package not installed
|
||||
# Slackware also has RPM for some reason and that's why this test precedes the RPMBINARY test
|
||||
elif [ "${OS_NAME}" = "Slackware Linux" -a -d "${ROOTDIR}/var/lib/pkgtools/packages" ]; then
|
||||
output=$( ls ${ROOTDIR}/var/lib/pkgtools/packages/ 2> /dev/null | ${GREPBINARY} "^${package}-[^-]\+-[^-]\+-[^-]\+$" )
|
||||
exit_code=$?
|
||||
elif [ -n "${RPMBINARY}" ]; then
|
||||
output=$(${RPMBINARY} --quiet -q ${package} > /dev/null 2>&1)
|
||||
exit_code=$?
|
||||
|
|
Loading…
Reference in New Issue