redir err to out to avoid leaks to console

This commit is contained in:
Jason Ertel
2023-05-25 15:24:09 -04:00
parent 074f84ae4d
commit 7d6182a18f

View File

@@ -927,9 +927,9 @@ create_repo() {
detect_cloud() {
info "Testing if setup is running on a cloud instance..."
if dmidecode -s bios-version | grep -q amazon || \
dmidecode -s bios-vendor | grep -q Amazon || \
dmidecode -s bios-vendor | grep -q Google || \
if dmidecode -s bios-version 2>&1 | grep -q amazon || \
dmidecode -s bios-vendor 2>&1 | grep -q Amazon || \
dmidecode -s bios-vendor 2>&1 | grep -q Google || \
[ -f /var/log/waagent.log ]; then
info "Detected a cloud installation..."