mirror of
https://github.com/CISOfy/lynis.git
synced 2026-03-11 08:55:28 +00:00
Changes to uptime calculation for OpenBSD
This commit is contained in:
parent
160f727709
commit
a1d8ee1e13
1 changed files with 2 additions and 2 deletions
|
|
@ -580,10 +580,10 @@
|
|||
OpenBSD)
|
||||
if [ ! "${SYSCTLBINARY}" = "" ]; then
|
||||
TIME_BOOT=`${SYSCTLBINARY} -n kern.boottime`
|
||||
TIME_NOW=`date "+%s"`
|
||||
logtext "Boot time: ${TIME_BOOT}"
|
||||
logtext "Current time: ${TIME_NOW}"
|
||||
TIME_NOW=`date "+%s"`
|
||||
if [ ! "${TIME_BOOT}" = "" -a "${TIME_NOW}" = "" ]; then
|
||||
if [ ! "${TIME_BOOT}" = "" -a ! "${TIME_NOW}" = "" ]; then
|
||||
UPTIME_IN_SECS=`expr ${TIME_NOW} - ${TIME_BOOT}`
|
||||
else
|
||||
ReportException "${TEST_NO}:5" "Most likely kern.boottime empty, unable to determine uptime"
|
||||
|
|
|
|||
Loading…
Reference in a new issue