diff --git a/setup/so-functions b/setup/so-functions index 132d6d202..83a3ec7fd 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -854,10 +854,8 @@ configure_network_sensor() { echo "Setting up sensor interface" >> "$setup_log" 2>&1 if [[ $is_cloud ]]; then - INTERFACE=${BNICS[0]} local nmcli_con_args=( "type" "ethernet" ) else - INTERFACE='bond0' local nmcli_con_args=( "type" "bond" "mode" "0" ) fi @@ -1307,6 +1305,22 @@ generate_repo_tarball() { tar -czf /opt/so/repo/"$SOVERSION".tar.gz ../. } +generate_sensor_vars() { + # Set the MTU + if [[ $NSMSETUP != 'ADVANCED' ]]; then + if [[ $is_cloud ]]; then MTU=1575; else MTU=1500; fi + fi + export MTU + + # Set interface variable + if [[ $is_cloud ]]; then + INTERFACE=${BNICS[0]} + else + INTERFACE='bond0' + fi + export INTERFACE +} + get_redirect() { whiptail_set_redirect if [ "$REDIRECTINFO" = "OTHER" ]; then @@ -2243,12 +2257,6 @@ sensor_pillar() { local pillar_file=$temp_install_dir/pillar/minions/$MINION_ID.sls - # Set the MTU - if [[ $NSMSETUP != 'ADVANCED' ]]; then - if [[ $is_cloud ]]; then MTU=1575; else MTU=1500; fi - fi - export MTU - # Create the sensor pillar printf '%s\n'\ "sensor:"\ diff --git a/setup/so-setup b/setup/so-setup index a4bf034cc..91103d21a 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -575,6 +575,7 @@ set_redirect >> $setup_log 2>&1 if [[ $is_sensor || $is_helix || $is_import ]]; then set_progress_str 3 'Generating sensor pillar' + generate_sensor_vars sensor_pillar >> $setup_log 2>&1 if [[ $is_sensor || $is_helix ]]; then steno_pillar >> $setup_log