more detection improvements

This commit is contained in:
Jason Ertel
2023-05-02 07:57:49 -04:00
parent 6c151d3ebd
commit 40ff2677c4

View File

@@ -917,15 +917,19 @@ create_repo() {
logCmd "createrepo /nsm/repo" logCmd "createrepo /nsm/repo"
} }
detect_cloud() { detect_cloud() {
info "Testing if setup is running on a cloud instance..." info "Testing if setup is running on a cloud instance..."
if dmidecode -s bios-version | grep -q amazon || \ if dmidecode -s bios-version | grep -q amazon || \
dmidecode -s bios-vendor | grep -q Google || \ dmidecode -s bios-vendor | grep -q Amazon || \
[ -f /var/log/waagent.log ]; then dmidecode -s bios-vendor | grep -q Google || \
info "Detected a cloud installation..." && export is_cloud="true"; [ -f /var/log/waagent.log ]; then
else
info "This does not appear to be a cloud installation." info "Detected a cloud installation..."
fi export is_cloud="true"
else
info "This does not appear to be a cloud installation."
fi
} }
detect_os() { detect_os() {