Limit management bond setup to ISO installs

This commit is contained in:
Mike Reeves
2026-05-05 15:30:09 -04:00
parent 3b714db0bf
commit ecb92d43fc
3 changed files with 5 additions and 23 deletions
+2 -12
View File
@@ -1040,7 +1040,7 @@ es_heapsize() {
filter_unused_nics() { filter_unused_nics() {
if [[ $MNIC ]]; then local grep_string="$MNIC\|bond0\|bond1"; else local grep_string="bond0\|bond1"; fi if [[ $MNIC ]]; then local grep_string="$MNIC\|bond0"; else local grep_string="bond0"; fi
# If we call this function and NICs have already been assigned to the bond interface then add them to the grep search string # If we call this function and NICs have already been assigned to the bond interface then add them to the grep search string
if [[ $BNICS ]]; then if [[ $BNICS ]]; then
@@ -1443,7 +1443,7 @@ network_init() {
title "Initializing Network" title "Initializing Network"
disable_ipv6 disable_ipv6
set_hostname set_hostname
if [[ $is_iso || $is_desktop_iso || $MNIC == "bond1" ]]; then if [[ $is_iso || $is_desktop_iso ]]; then
set_management_interface set_management_interface
fi fi
} }
@@ -1465,16 +1465,6 @@ network_init_whiptail() {
whiptail_network_notice whiptail_network_notice
whiptail_dhcp_warn whiptail_dhcp_warn
whiptail_management_nic whiptail_management_nic
if [[ $MNIC == "bond1" ]]; then
whiptail_dhcp_or_static
if [ "$address_type" != 'DHCP' ]; then
collect_int_ip_mask
collect_gateway
collect_dns
collect_dns_domain
fi
fi
;; ;;
esac esac
} }
-10
View File
@@ -292,16 +292,6 @@ if ! [[ -f $install_opt_file ]]; then
# Warn about the dangers of DHCP # Warn about the dangers of DHCP
whiptail_dhcp_warn whiptail_dhcp_warn
whiptail_management_nic whiptail_management_nic
if [[ $MNIC == "bond1" ]]; then
whiptail_dhcp_or_static
if [ "$address_type" != 'DHCP' ]; then
collect_int_ip_mask
collect_gateway
collect_dns
collect_dns_domain
fi
fi
fi fi
# Initializing the network based on the previous information # Initializing the network based on the previous information
network_init network_init
+3 -1
View File
@@ -846,7 +846,9 @@ whiptail_management_nic() {
filter_unused_nics filter_unused_nics
local management_nic_options=( "${nic_list_management[@]}" ) local management_nic_options=( "${nic_list_management[@]}" )
management_nic_options+=( "BOND" "Configure a bonded management interface" ) if [[ $is_iso || $is_desktop_iso ]]; then
management_nic_options+=( "BOND" "Configure a bonded management interface" )
fi
MNIC=$(whiptail --title "$whiptail_title" --menu "Please select the NIC you would like to use for management.\n\nUse the arrow keys to move around and the Enter key to select." 20 75 12 "${management_nic_options[@]}" 3>&1 1>&2 2>&3 ) MNIC=$(whiptail --title "$whiptail_title" --menu "Please select the NIC you would like to use for management.\n\nUse the arrow keys to move around and the Enter key to select." 20 75 12 "${management_nic_options[@]}" 3>&1 1>&2 2>&3 )
local exitstatus=$? local exitstatus=$?