Changeset 1241

Show
Ignore:
Timestamp:
11/13/06 15:36:25 (5 years ago)
Author:
janl
Message:
  • Bugfix linux/if_ plugin (--path=>-p, quoting, ethtool output tolerance)
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/node/node.d.linux/if_.in

    r1173 r1241  
    2626    # maximum speed of a network interface.  Buckle up! 
    2727 
    28     IWLIST=$(type --path iwlist) 
     28    IWLIST="$(type -p iwlist)" 
    2929 
    3030    WIRELESS=0 
     
    5151    case $WIRELESS:$IWLIST in 
    5252        0:*) 
    53             ETHTOOL=$(type --path ethtool) 
     53            ETHTOOL="$(type -p ethtool)" 
    5454            if [ -x "$ETHTOOL" ]; then 
    55                 SPEED="$($ETHTOOL $INTERFACE | awk '/Speed:/ { print $2; }')" 
     55                SPEED="$($ETHTOOL $INTERFACE | 
     56                         awk '/Speed:/ { gsub(/[^0-9]*/,"",$2); print $2; }')" 
    5657                case $SPEED in 
    5758                    [0-9]*) :;; # OK 
     
    7677    esac 
    7778 
    78     MIITOOL=$(type --path mii-tool) 
     79    MIITOOL="$(type -p mii-tool)" 
    7980    case $SPEED:$MIITOOL in 
    8081        U:/*)