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

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)
This commit is contained in:
Stefan Metzmacher 2010-01-18 13:05:54 +01:00
parent dbe912793e
commit 12c8dd215c

View File

@ -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" && {