Eventscripts: 10.interfaces - make startup event actually mark interfaces up!
authorMartin Schwenke <martin@meltin.net>
Tue, 5 Jul 2011 07:21:57 +0000 (17:21 +1000)
committerMartin Schwenke <martin@meltin.net>
Fri, 12 Aug 2011 06:34:34 +0000 (16:34 +1000)
The startup event intends to mark interfaces up.  However, it doesn't
actually do that because $INTERFACES is empty.

This uses the function get_all_interfaces() to list the
interfaces... and then mark them up.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/events.d/10.interface

index e34f467faa3e23fd04580a84cae316110cb47a7b..0e428d0efd28b830bbd5c157015e7b71de913d0d 100755 (executable)
@@ -145,10 +145,9 @@ case "$1" in
      # and we start the services to become healthy
      startup)
        # Assume all links are good initially
-       INTERFACES=`for IFACE in $INTERFACES ; do echo $IFACE ; done | sort | uniq`
-
-       for IFACE in $INTERFACES ; do
-               ctdb setifacelink $IFACE up >/dev/null 2>/dev/null
+       get_all_interfaces
+       for iface in $all_interfaces ; do
+               ctdb setifacelink $iface up >/dev/null 2>/dev/null
        done
        
        monitor_interfaces