more detection improvements

This commit is contained in:
Jason Ertel
2023-05-02 07:56:11 -04:00
parent f7ae8d449e
commit 1e888a5d9e

View File

@@ -1123,16 +1123,17 @@ create_repo() {
}
detect_cloud() {
echo "Testing if setup is running on a cloud instance..." | tee -a "$setup_log"
if dmidecode -s bios-version | grep -q amazon || \
dmidecode -s bios-vendor | grep -q Google || \
[ -f /var/log/waagent.log ]; then
echo "Testing if setup is running on a cloud instance..." | tee -a "$setup_log"
if dmidecode -s bios-version | grep -q amazon || \
dmidecode -s bios-vendor | grep -q Amazon || \
dmidecode -s bios-vendor | grep -q Google || \
[ -f /var/log/waagent.log ]; then
echo "Detected a cloud installation." | tee -a "$setup_log"
export is_cloud="true"
else
echo "This does not appear to be a cloud installation." | tee -a "$setup_log"
fi
echo "Detected a cloud installation." | tee -a "$setup_log"
export is_cloud="true"
else
echo "This does not appear to be a cloud installation." | tee -a "$setup_log"
fi
}
detect_os() {