diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-01-18 13:05:54 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-01-20 11:11:04 +0100 |
commit | 12c8dd215c0a1a110b078a86b7589ef323c913b8 (patch) | |
tree | dbac01320043e1a34337172a8f022b5b66be2414 /ctdb/config | |
parent | dbe912793ec65664b18ec9f7106cf8b758192610 (diff) | |
download | samba-12c8dd215c0a1a110b078a86b7589ef323c913b8.tar.gz samba-12c8dd215c0a1a110b078a86b7589ef323c913b8.tar.xz samba-12c8dd215c0a1a110b078a86b7589ef323c913b8.zip |
config: 10.interface: search "ethtool" in $PATH instead of using a hardcoded path
This is very useful for testing, I use such a script:
cat ~/bin/ethtool
#!/bin/sh
IFACE=$1
case "$IFACE" in
Neth2)
;;
Neth3)
;;
Neth4)
;;
Neth5)
;;
*)
exec /usr/sbin/ethtool $@
;;
esac
ip link set down $IFACE
exec /usr/sbin/ethtool $@
metze
(This used to be ctdb commit 3bab985cf615720eded4d47b4f9f37a9c28840aa)
Diffstat (limited to 'ctdb/config')
-rwxr-xr-x | ctdb/config/events.d/10.interface | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/config/events.d/10.interface b/ctdb/config/events.d/10.interface index 4f7e8de84e..9365106f17 100755 --- a/ctdb/config/events.d/10.interface +++ b/ctdb/config/events.d/10.interface @@ -81,13 +81,13 @@ monitor_interfaces() ;; *) [ -z "$IFACE" ] || { - /usr/sbin/ethtool $IFACE | grep -q 'Link detected: yes' || { + 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 # brought up previously. Bring the interface up and # try again... /sbin/ip link set $IFACE up - /usr/sbin/ethtool $IFACE | grep -q 'Link detected: yes' || { + ethtool $IFACE | grep -q 'Link detected: yes' || { echo "ERROR: No link on the public network interface $IFACE" fail=1 test -n "$OLDLINK" && { |