Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2014-11-04 04:23:43 +0300
committermboelen <michael@cisofy.com>2014-11-04 04:23:43 +0300
commita1d8ee1e131b1b735e60a9cd83a0ce9e8391f43b (patch)
treef53e4048c0c41bf0cfb78089e215bbeaab1b2d20
parent160f727709ec1ca200ee014a06714f7818cb3526 (diff)
Changes to uptime calculation for OpenBSD
-rw-r--r--include/tests_boot_services4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/tests_boot_services b/include/tests_boot_services
index 484bbb4c..f2c123af 100644
--- a/include/tests_boot_services
+++ b/include/tests_boot_services
@@ -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"