mirror of https://github.com/CISOfy/lynis.git
[PROC-3602] Use ROOTDIR
This commit is contained in:
parent
f5adb68e00
commit
1a57b41bdd
|
@ -30,17 +30,17 @@
|
|||
# Description : Query /proc/meminfo
|
||||
Register --test-no PROC-3602 --os Linux --weight L --network NO --category security --description "Checking /proc/meminfo for memory details"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
if [ -f /proc/meminfo ]; then
|
||||
LogText "Result: found /proc/meminfo"
|
||||
Display --indent 2 --text "- Checking /proc/meminfo" --result "${STATUS_FOUND}" --color GREEN
|
||||
FIND=$(${AWKBINARY} '/^MemTotal/ { print $2, $3 }' /proc/meminfo)
|
||||
if [ -f ${ROOTDIR}proc/meminfo ]; then
|
||||
LogText "Result: found ${ROOTDIR}proc/meminfo"
|
||||
Display --indent 2 --text "- Checking ${ROOTDIR}proc/meminfo" --result "${STATUS_FOUND}" --color GREEN
|
||||
FIND=$(${AWKBINARY} '/^MemTotal/ { print $2, $3 }' ${ROOTDIR}proc/meminfo)
|
||||
MEMORY_SIZE=$(echo ${FIND} | ${AWKBINARY} '{ print $1 }')
|
||||
MEMORY_UNITS=$(echo ${FIND} | ${AWKBINARY} '{ print $2 }')
|
||||
LogText "Result: Found ${MEMORY_SIZE} ${MEMORY_UNITS} memory"
|
||||
Report "memory_size=${MEMORY_SIZE}"
|
||||
Report "memory_units=${MEMORY_UNITS}"
|
||||
else
|
||||
LogText "Result: /proc/meminfo file not found on this system"
|
||||
LogText "Result: ${ROOTDIR}proc/meminfo file not found on this system"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue