Fix a thinko in 2ea0a9f1a93781a0d036feb9fcc0d120b182922f.
authorMartin Schwenke <martin@meltin.net>
Tue, 20 Apr 2010 00:52:31 +0000 (10:52 +1000)
committerMartin Schwenke <martin@meltin.net>
Tue, 20 Apr 2010 00:52:31 +0000 (10:52 +1000)
If the driver is virtio_net then we assume that the link is up rather
than ignoring the check altogether.

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

index 35a8b2f4394f3d4f3d1e294202beb2b21b1442c6..fdb15571de428558c4171dc357e767fc3a77b821 100755 (executable)
@@ -80,8 +80,8 @@ monitor_interfaces()
                # we dont know how to test ib links
                ;;
            *)
-               [ -z "$IFACE" ] ||
-               [ "$(basename $(readlink /sys/class/net/$IFACE/device/driver))" = virtio_net ] || {
+               [ -z "$IFACE" ] {
+                   [ "$(basename $(readlink /sys/class/net/$IFACE/device/driver))" = virtio_net ] ||
                    ethtool $IFACE | grep -q 'Link detected: yes' || {
                        # On some systems, this is not successful when a
                        # cable is plugged but the interface has not been