From 2420cd5db1b2590752812a66251a53b5e1cfb51d Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 6 Oct 2020 10:46:11 -0400 Subject: [PATCH] add some system characteristics to log like normal install does --- salt/common/tools/sbin/so-analyst-install | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/salt/common/tools/sbin/so-analyst-install b/salt/common/tools/sbin/so-analyst-install index 7ac8524dd..732ea6936 100755 --- a/salt/common/tools/sbin/so-analyst-install +++ b/salt/common/tools/sbin/so-analyst-install @@ -23,6 +23,24 @@ fi INSTALL_LOG=/root/so-analyst-install.log exec &> >(tee -a "$INSTALL_LOG") +logCmd() { + cmd=$1 + info "Executing command: $cmd" + $cmd >> "$INSTALL_LOG" 2>&1 +} + +analyze_system() { + title "System Characteristics" + logCmd "uptime" + logCmd "uname -a" + logCmd "free -h" + logCmd "lscpu" + logCmd "df -h" + logCmd "ip a" +} + +analyze_system + OS=$(grep PRETTY_NAME /etc/os-release | grep 'CentOS Linux 7') if [ $? -ne 0 ]; then echo "This is an unsupported OS. Please use CentOS 7 to install the analyst node."