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:
authorHansHoogerwerf <hans3132@live.nl>2022-10-17 17:24:59 +0300
committerGitHub <noreply@github.com>2022-10-17 17:24:59 +0300
commitff26dca83a0f788ac7853b73e9d42cec49846aa7 (patch)
tree9bab120969f8e3c2394e66ae6543376d51c2e31f
parent98ac5a562ad6f347bcde307d56466b2668251908 (diff)
Fix simple mistake
-rw-r--r--include/functions16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/functions b/include/functions
index db4c7ef8..5ae9b978 100644
--- a/include/functions
+++ b/include/functions
@@ -2562,17 +2562,19 @@
GetTimestamp() {
ts=0
- # Detect if the implementation of date supports nanoseconds,
- if [ "${OS}" = "Linux" ]; then
- current_nanoseconds=$(date "+%N")
- # Verify if the result of the command is a number
+ # Detect if the implementation of date supports nanoseconds,
+ if [ "${OS}" = "Linux" ]; then
+ current_nanoseconds=$(date "+%N")
+ # Verify if the result of the command is a number
if [ -n "$current_nanoseconds" ] && [ "$current_nanoseconds" -eq "$current_nanoseconds" ] 2>/dev/null; then
ts=$(date "+%s%N")
else
- ts=$(date "+%s")
- fi
+ ts=$(date "+%s")
+ fi
+ else
+ ts=$(date "+%s")
fi
- echo $ts
+ echo $ts
}
Register() {