mirror of https://github.com/CISOfy/lynis.git
Fix simple mistake
This commit is contained in:
parent
98ac5a562a
commit
ff26dca83a
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue