From a884f4af340a5492453b85a0918651d2d7ae2525 Mon Sep 17 00:00:00 2001 From: jgaunt Date: Wed, 25 Dec 2019 13:19:21 -0500 Subject: [PATCH] Add 'GauntPlexBond.sh' --- GauntPlexBond.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 GauntPlexBond.sh diff --git a/GauntPlexBond.sh b/GauntPlexBond.sh new file mode 100644 index 0000000..ebd74bb --- /dev/null +++ b/GauntPlexBond.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin + +INTERFACES=$(ip link | grep "state UP" | awk '{ if($2 != "bond0:" && $2 != "idrac:") print substr($2,1,length($2)-1)}') + +for n in $INTERFACES; do +# Make sure both the interfaces are setup as slaves +cat > /etc/sysconfig/network-scripts/ifcfg-$n < /etc/sysconfig/network-scripts/ifcfg-bond0 <