diff --git a/check_bond/trunk/check_bond b/check_bond/trunk/check_bond index 8d8f738..9d26451 100644 --- a/check_bond/trunk/check_bond +++ b/check_bond/trunk/check_bond @@ -106,16 +106,16 @@ def main(argv): print "Critical: bonding device %s %s" % (interface, bond['mii_status']) sys.exit(2) - # Some interface in the bond is down - for slave in bond['slaves']: - if slave['mii_status'] != 'up': - outstring = "%s%s down " % (outstring, slave['int']) - if retval < 1: - retval = 1 + # Some interface in the bond is down + for slave in bond['slaves']: + if slave['mii_status'] != 'up': + outstring = "%s%s down " % (outstring, slave['int']) + if retval < 1: + retval = 1 - if retval: - print "%s: %s%s %s" % (states[retval], outstring, "in bonding device", interface) - sys.exit(retval) + if retval: + print "%s: %s%s %s" % (states[retval], outstring, "in bonding device", interface) + sys.exit(retval) print "OK: bonding device %s up and running" % interface sys.exit(0)