1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

ctdb-eventscripts: Remove special case for virtio_net

The current check is incorrect in 2 ways:

* Commit be71a84565 contained a thinko
  that stops virtio_net interfaces from simply being marked up

* virtio_net interfaces can actually be down

virtio_net has supported ethtool since Linux 2.6.29, so just remove
the special case.  This means that testing CTDB on very old virtual
machines is not supported.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Jul 31 13:08:47 CEST 2014 on sn-devel-104
This commit is contained in:
Martin Schwenke 2014-07-29 15:08:36 +10:00 committed by Amitay Isaacs
parent e17c241711
commit bc59e508d3

View File

@ -110,11 +110,6 @@ monitor_interfaces()
mark_up $iface mark_up $iface
;; ;;
*) *)
# Ignore virtio_net devices, assume they're always up
_driver_path="/sys/class/net/$iface/device/driver"
_driver=$(basename $(readlink "$_driver_path") 2>/dev/null)
[ "$_driver" = "virtio_net" ] && continue
ethtool $iface | grep -q 'Link detected: yes' || { ethtool $iface | grep -q 'Link detected: yes' || {
# On some systems, this is not successful when a # On some systems, this is not successful when a
# cable is plugged but the interface has not been # cable is plugged but the interface has not been