#!/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 <