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
path: root/lynis
diff options
context:
space:
mode:
Diffstat (limited to 'lynis')
-rwxr-xr-xlynis22
1 files changed, 14 insertions, 8 deletions
diff --git a/lynis b/lynis
index 67919b84..006663ca 100755
--- a/lynis
+++ b/lynis
@@ -970,17 +970,23 @@ ${NORMAL}
# Get host ID
LogTextBreak
GetHostID
+ LogText "hostid-generation: method ${HOSTID_GEN}"
+ LogText "hostid2-generation: method ${HOSTID2_GEN}"
# Check if result is not empty (no blank, or hash of blank value, or minus, or zeros)
- if [ ! "${HOSTID}" = "-" -a ! "${HOSTID}" = "" -a ! "${HOSTID}" = "adc83b19e793491b1c6ea0fd8b46cd9f32e592fc" -a ! "${HOSTID}" = "6ef1338f520d075957424741d7ed35ab5966ae97" ]; then
- LogText "Info: found valid HostID ${HOSTID}"
- Report "hostid=${HOSTID}"
- else
- LogText "Info: no HostID found or invalid one"
- fi
- if [ ! "${HOSTID2}" = "" ]; then
+ case ${HOSTID} in
+ "" | "-" | "adc83b19e793491b1c6ea0fd8b46cd9f32e592fc" | "6ef1338f520d075957424741d7ed35ab5966ae97")
+ LogText "Info: no HostID found or invalid one"
+ ;;
+ *)
+ LogText "Info: HostID ${HOSTID} looks to be valid"
+ Report "hostid=${HOSTID}"
+ ;;
+ esac
+
+ if [ -n "${HOSTID2}" ]; then
Report "hostid2=${HOSTID2}"
fi
- if [ ! "${MACHINEID}" = "" ]; then
+ if [ -n "${MACHINEID}" ]; then
LogText "Info: found a machine ID ${MACHINEID}"
Report "machineid=${MACHINEID}"
else