mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-28 00:04:16 +02:00
Fix simple mistake
This commit is contained in:
parent
98ac5a562a
commit
ff26dca83a
@ -2562,17 +2562,19 @@
|
|||||||
|
|
||||||
GetTimestamp() {
|
GetTimestamp() {
|
||||||
ts=0
|
ts=0
|
||||||
# Detect if the implementation of date supports nanoseconds,
|
# Detect if the implementation of date supports nanoseconds,
|
||||||
if [ "${OS}" = "Linux" ]; then
|
if [ "${OS}" = "Linux" ]; then
|
||||||
current_nanoseconds=$(date "+%N")
|
current_nanoseconds=$(date "+%N")
|
||||||
# Verify if the result of the command is a number
|
# Verify if the result of the command is a number
|
||||||
if [ -n "$current_nanoseconds" ] && [ "$current_nanoseconds" -eq "$current_nanoseconds" ] 2>/dev/null; then
|
if [ -n "$current_nanoseconds" ] && [ "$current_nanoseconds" -eq "$current_nanoseconds" ] 2>/dev/null; then
|
||||||
ts=$(date "+%s%N")
|
ts=$(date "+%s%N")
|
||||||
else
|
else
|
||||||
ts=$(date "+%s")
|
ts=$(date "+%s")
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
ts=$(date "+%s")
|
||||||
fi
|
fi
|
||||||
echo $ts
|
echo $ts
|
||||||
}
|
}
|
||||||
|
|
||||||
Register() {
|
Register() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user