diff --git a/setup/so-functions b/setup/so-functions index d2915f4ff..5bbb319eb 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -505,10 +505,10 @@ configure_network_sensor() { # Set the MTU if [[ $NSMSETUP != 'ADVANCED' ]]; then - if [[ $is_ec2 ]]; then MTU=1575; else MTU=1500; fi + if [[ $is_cloud ]]; then MTU=1575; else MTU=1500; fi fi - if [[ $is_ec2 ]]; then + if [[ $is_cloud ]]; then INTERFACE=${BNICS[0]} local nmcli_con_arg="type ethernet" else @@ -553,7 +553,7 @@ configure_network_sensor() { ethtool -K "$BNIC" $i off >> "$setup_log" 2>&1 done - if [[ $is_ec2 ]]; then + if [[ $is_cloud ]]; then nmcli con up "$BNIC" >> "$setup_log" 2>&1 else # Check if the bond slave connection has already been created @@ -583,9 +583,9 @@ configure_network_sensor() { fi } -detect_ec2() { - echo "Testing if setup is running on an EC2 instance" - if ( curl --fail -s -m 5 http://169.254.169.254/latest/meta-data/instance-id > /dev/null ); then export is_ec2="true"; fi +detect_cloud() { + echo "Testing if setup is running on a cloud instance" + 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 } detect_os() { diff --git a/setup/so-setup b/setup/so-setup index b6ef14c3a..3f6d42380 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -109,7 +109,7 @@ export PATH=$PATH:../salt/common/tools/sbin got_root -detect_os && detect_ec2 +detect_os && detect_cloud set_network_dev_status_list if [ "$OS" == ubuntu ]; then