mirror of https://github.com/CISOfy/lynis.git
Use the right columns from DNF to split package name and version
This commit is contained in:
parent
d3e58a0537
commit
647b482c53
|
@ -391,8 +391,8 @@
|
|||
SPACKAGES=`${DNFBINARY} -q list installed 2> /dev/null | awk '{ if ($1!="Installed" && $1!="Last") {print $1","$2 }}'`
|
||||
for J in ${SPACKAGES}; do
|
||||
N=`expr ${N} + 1`
|
||||
PACKAGE_NAME=`echo ${J} | cut -d ',' -f2`
|
||||
PACKAGE_VERSION=`echo ${J} | cut -d ',' -f3`
|
||||
PACKAGE_NAME=`echo ${J} | cut -d ',' -f1`
|
||||
PACKAGE_VERSION=`echo ${J} | cut -d ',' -f2`
|
||||
LogText "Found package: ${PACKAGE_NAME} (version: ${PACKAGE_VERSION})"
|
||||
INSTALLED_PACKAGES="${INSTALLED_PACKAGES}|${PACKAGE_NAME},${PACKAGE_VERSION}"
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue