aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2012-01-07 15:47:48 -0600
committerWilliam Hubbs <williamh@gentoo.org>2012-01-07 15:47:48 -0600
commitd02d3af02e4254b04949de546c5d53af82cc2fc2 (patch)
tree54c3c9b2ec106449af60039fab68cd7ce58880b8 /net
parent61e05331d14a08fa909526fda15470a1ca4927dd (diff)
net: make lookup of ethtool dynamic
The ethtool module checked in two places for the ethtool binary; now we look for it in the path.
Diffstat (limited to 'net')
-rw-r--r--net/ethtool.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ethtool.sh b/net/ethtool.sh
index fecb7b91..ba5719d1 100644
--- a/net/ethtool.sh
+++ b/net/ethtool.sh
@@ -1,13 +1,12 @@
# Copyright (c) 2011 by Gentoo Foundation
# Released under the 2-clause BSD license.
-_ethtool() {
- echo /usr/sbin/ethtool
-}
-
ethtool_depend()
{
- program $(_ethtool)
+ local x
+ x=$(_which ethtool)
+ [ -z "$x" ] && return 1
+ program $x
before interface
}