Merge pull request #3781 from Security-Onion-Solutions/waagent

Detect if running in an Azure VM
This commit is contained in:
Jason Ertel
2021-04-07 08:35:36 -04:00
committed by GitHub

View File

@@ -1012,7 +1012,7 @@ create_repo() {
detect_cloud() { detect_cloud() {
echo "Testing if setup is running on a cloud instance..." | tee -a "$setup_log" echo "Testing if setup is running on a cloud instance..." | tee -a "$setup_log"
if ( curl --fail -s -m 5 http://169.254.169.254/latest/meta-data/instance-id > /dev/null ) || ( dmidecode -s bios-vendor | grep -q Google > /dev/null); then export is_cloud="true"; fi if ( curl --fail -s -m 5 http://169.254.169.254/latest/meta-data/instance-id > /dev/null ) || ( dmidecode -s bios-vendor | grep -q Google > /dev/null) || [ -f /var/log/waagent.log ]; then export is_cloud="true"; fi
} }
detect_os() { detect_os() {