Merge pull request #89 from rwwiv/master

Fixes to create_bond_nmcli() function
This commit is contained in:
Mike Reeves
2019-06-03 11:42:34 -04:00
committed by GitHub

View File

@@ -247,7 +247,7 @@ copy_ssh_key() {
} }
create_bond_nmcli() { create_bond_nmcli() {
echo "Setting up Bond" >>~/sosetup.log 2>&1 echo "Setting up Bond" >> $SETUPLOG 2>&1
# Set the MTU # Set the MTU
if [ $NSMSETUP != 'ADVANCED' ]; then if [ $NSMSETUP != 'ADVANCED' ]; then
@@ -258,21 +258,22 @@ create_bond_nmcli() {
nmcli con add type bond ifname bond0 con-name "bond0" \ nmcli con add type bond ifname bond0 con-name "bond0" \
bond.options "mode=0" \ bond.options "mode=0" \
802-3-ethernet.mtu $MTU \ 802-3-ethernet.mtu $MTU \
ipv4.method "manual" \ ipv4.method "disabled" \
ipv6.method "ignore" \
connection.autoconnect "yes" \ connection.autoconnect "yes" \
>> ~/sosetup.log 2>&1 >> $SETUPLOG 2>&1
for BNIC in ${BNICS[@]}; do for BNIC in ${BNICS[@]}; do
# Strip the quotes from the NIC names # Strip the quotes from the NIC names
BONDNIC=${awk -F\" | '{print $2}' <<< $BNIC} BONDNIC="$(echo -e "${BNIC}" | tr -d '"')"
# Create the slave interface and assign it to the bond # Create the slave interface and assign it to the bond
nmcli con add type ethernet ifname $BONDNIC master bond0 \ nmcli con add type ethernet ifname $BONDNIC master bond0 \
connection.autoconnect yes \ connection.autoconnect "yes" \
802-3-ethernet.mtu $MTU \ 802-3-ethernet.mtu $MTU \
con-name "bond0-slave-$BNIC" \ con-name "bond0-slave-$BONDNIC" \
>> ~/sosetup.log 2>&1 >> $SETUPLOG 2>&1
# Bring the slave interface up # Bring the slave interface up
nmcli con up bond0-slave-$BNIC >> ~/sosetup.log 2>&1 nmcli con up bond0-slave-$BONDNIC >> $SETUPLOG 2>&1
done done
} }
@@ -1777,7 +1778,7 @@ if (whiptail_you_sure); then
echo -e "XXX\n0\nSetting Initial Firewall Policy... \nXXX" echo -e "XXX\n0\nSetting Initial Firewall Policy... \nXXX"
set_initial_firewall_policy >> $SETUPLOG 2>&1 set_initial_firewall_policy >> $SETUPLOG 2>&1
echo -e "XXX\n3\nCreating Bond Interface... \nXXX" echo -e "XXX\n3\nCreating Bond Interface... \nXXX"
create_bond >>$SETUPLOG 2>&1 create_bond_nmcli >> $SETUPLOG 2>&1
echo -e "XXX\n4\nGenerating Sensor Pillar... \nXXX" echo -e "XXX\n4\nGenerating Sensor Pillar... \nXXX"
sensor_pillar >> $SETUPLOG 2>&1 sensor_pillar >> $SETUPLOG 2>&1
echo -e "XXX\n5\nInstalling Salt Components... \nXXX" echo -e "XXX\n5\nInstalling Salt Components... \nXXX"
@@ -1867,7 +1868,7 @@ if (whiptail_you_sure); then
{ {
sleep 0.5 sleep 0.5
echo -e "XXX\n0\nCreating Bond Interface... \nXXX" echo -e "XXX\n0\nCreating Bond Interface... \nXXX"
create_bond >>$SETUPLOG 2>&1 create_bond_nmcli >> $SETUPLOG 2>&1
echo -e "XXX\n1\nInstalling saltstack... \nXXX" echo -e "XXX\n1\nInstalling saltstack... \nXXX"
saltify >> $SETUPLOG 2>&1 saltify >> $SETUPLOG 2>&1
echo -e "XXX\n3\nInstalling docker... \nXXX" echo -e "XXX\n3\nInstalling docker... \nXXX"