Setup Scripts - Fix bond nic text for centos

This commit is contained in:
Mike Reeves
2018-10-08 12:30:59 -04:00
parent d29eecad12
commit 1cfc6fe386

View File

@@ -164,9 +164,11 @@ create_bond() {
# Create Bond configs for the selected monitor interface # Create Bond configs for the selected monitor interface
for BNIC in ${BNICS[@]}; do for BNIC in ${BNICS[@]}; do
sed -i 's/ONBOOT=\"no\"/ONBOOT=\"yes\"/g' /etc/sysconfig/network-scripts/ifcfg-$BNIC BONDNIC="${BNIC%\"}"
echo "MASTER=bond0" >> /etc/sysconfig/network-scripts/ifcfg-$BNIC BONDNIC="${BONDNIC#\"}"
echo "SLAVE=yes" >> /etc/sysconfig/network-scripts/ifcfg-$BNIC sed -i 's/ONBOOT=\"no\"/ONBOOT=\"yes\"/g' /etc/sysconfig/network-scripts/ifcfg-$BONDNIC
echo "MASTER=bond0" >> /etc/sysconfig/network-scripts/ifcfg-$BONDNIC
echo "SLAVE=yes" >> /etc/sysconfig/network-scripts/ifcfg-$BONDNIC
done done
nmcli con reload nmcli con reload
systemctl restart networking systemctl restart networking
@@ -465,7 +467,7 @@ saltify() {
yum clean expire-cache yum clean expire-cache
yum -y install salt-minion yum-utils device-mapper-persistent-data lvm2 openssl yum -y install salt-minion yum-utils device-mapper-persistent-data lvm2 openssl
yum -y update yum -y update
# Nasty hack but required for now # Nasty hack but required for now
if [ $INSTALLTYPE == 'MASTERONLY' ] || [ $INSTALLTYPE == 'EVALMODE' ]; then if [ $INSTALLTYPE == 'MASTERONLY' ] || [ $INSTALLTYPE == 'EVALMODE' ]; then
yum -y install salt-master python-m2crypto salt-minion m2crypto yum -y install salt-master python-m2crypto salt-minion m2crypto