From Alexander Saupp.
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 28 Jul 2008 07:07:44 +0000 (17:07 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 28 Jul 2008 07:07:44 +0000 (17:07 +1000)
If we use vlan tagging and bonding we must strip the vlan part off the name
so we can check the main bonde device for status.

I.e. check bond0  instead of bond0.<VLANTAG>

config/events.d/10.interface

index 8283a3f20d9547d1304b16f66cceafe765de5945..15e55618d1538a906c1423a3537cd427ffd518bf 100755 (executable)
@@ -147,6 +147,7 @@ case $cmd in
        for IFACE in $INTERFACES ; do
            case $IFACE in 
            bond*)
+               IFACE=`echo $IFACE |sed -e 's/\....$//'`
                grep '^MII Status: up' /proc/net/bonding/$IFACE > /dev/null || {
                        echo "ERROR: public network interface $IFACE is down"
                        exit 1