mirror of https://github.com/CISOfy/lynis.git
[KRNL-5830] Readability and style improvements
This commit is contained in:
parent
0993c0a13b
commit
ff38336e0b
|
@ -460,12 +460,12 @@
|
||||||
LogText "Test: Checking presence ${FILE}"
|
LogText "Test: Checking presence ${FILE}"
|
||||||
if [ -f ${FILE} ]; then
|
if [ -f ${FILE} ]; then
|
||||||
LogText "Result: file ${FILE} exists"
|
LogText "Result: file ${FILE} exists"
|
||||||
FIND=`cat ${FILE}`
|
FIND=$(wc -l < ${FILE})
|
||||||
if [ "${FIND}" = "" ]; then
|
if [ "${FIND}" = "0" ]; then
|
||||||
LogText "Result: No reboot needed (file empty)"
|
LogText "Result: No reboot needed (file empty)"
|
||||||
REBOOT_NEEDED=0
|
REBOOT_NEEDED=0
|
||||||
else
|
else
|
||||||
PKGSCOUNT=`cat ${FILE} | wc -l`
|
PKGSCOUNT=$(wc -l < {FILE})
|
||||||
LogText "Result: reboot is needed, related to ${PKGSCOUNT} packages"
|
LogText "Result: reboot is needed, related to ${PKGSCOUNT} packages"
|
||||||
for I in ${FIND}; do
|
for I in ${FIND}; do
|
||||||
LogText "Package: ${I}"
|
LogText "Package: ${I}"
|
||||||
|
@ -478,7 +478,7 @@
|
||||||
# Check if /boot exists
|
# Check if /boot exists
|
||||||
if [ -d /boot ]; then
|
if [ -d /boot ]; then
|
||||||
LogText "Result: /boot exists, performing more tests from here"
|
LogText "Result: /boot exists, performing more tests from here"
|
||||||
FIND=`ls /boot/* 2> /dev/null`
|
FIND=$(ls /boot/* 2> /dev/null)
|
||||||
if [ ! "${FIND}" = "" ]; then
|
if [ ! "${FIND}" = "" ]; then
|
||||||
if [ -f /boot/vmlinuz -a ! -L /boot/vmlinuz ]; then
|
if [ -f /boot/vmlinuz -a ! -L /boot/vmlinuz ]; then
|
||||||
LogText "Result: found /boot/vmlinuz (not symlinked)"
|
LogText "Result: found /boot/vmlinuz (not symlinked)"
|
||||||
|
|
Loading…
Reference in New Issue