mirror of
https://github.com/CISOfy/lynis.git
synced 2025-09-23 01:48:04 +02:00
Merge pull request #1646 from puck/dpkg-ignore-rc
Ignore Debian kernel packages with rc status
This commit is contained in:
commit
ff44797cf7
@ -1378,7 +1378,7 @@ EOF
|
|||||||
if [ "${DPKGBINARY}" ]; then
|
if [ "${DPKGBINARY}" ]; then
|
||||||
TESTED=1
|
TESTED=1
|
||||||
KERNEL_PKG_NAMES="linux-image-[0-9]|raspberrypi-kernel|pve-kernel-[0-9]|linux-odroid-5422"
|
KERNEL_PKG_NAMES="linux-image-[0-9]|raspberrypi-kernel|pve-kernel-[0-9]|linux-odroid-5422"
|
||||||
KERNELS=$(${DPKGBINARY} -l 2> /dev/null | ${GREPBINARY} -E "${KERNEL_PKG_NAMES}" | ${WCBINARY} -l)
|
KERNELS=$(${DPKGBINARY} -l 2> /dev/null | ${GREPBINARY} -E "${KERNEL_PKG_NAMES}" | ${GREPBINARY} -v ^rc | ${WCBINARY} -l)
|
||||||
if [ ${KERNELS} -eq 0 ]; then
|
if [ ${KERNELS} -eq 0 ]; then
|
||||||
LogText "Result: found no kernels from dpkg -l output, which is unexpected"
|
LogText "Result: found no kernels from dpkg -l output, which is unexpected"
|
||||||
elif [ ${KERNELS} -gt 5 ]; then
|
elif [ ${KERNELS} -gt 5 ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user