From 870cb041a971c43948024741a82d39f2828c0f64 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 3 Nov 2008 18:22:53 +0100 Subject: [PATCH] net-functions: getLanDriver() does not return driver for madwifi --- debian/changelog | 7 +++++++ net-functions | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index adc7d57..fdf33ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +grml-network (0.2.5) unstable; urgency=low + + * net-functions: getLanDriver() does not return driver for madwifi. + Thanks for the fix to Ulrich Dangel. [Closes: issue551] + + -- Michael Prokop Mon, 03 Nov 2008 18:22:01 +0100 + grml-network (0.2.4) unstable; urgency=low * net-functions: if there is a default route not via an ip diff --git a/net-functions b/net-functions index 07c333f..5545894 100644 --- a/net-functions +++ b/net-functions @@ -22,9 +22,9 @@ getWlanDevices() { # getLanDriver deviceName getLanDriver() { - DEVICE="$1" - echo $DEVICE | grep -q ath && DEVICE=$(echo $DEVICE | sed 's/ath/wifi/') - ethtool -i $DEVICE 2>/dev/null | awk '/^driver:/{print $2}' + if [ -e /sys/class/net/$1/device/driver ] ; then + basename $(readlink /sys/class/net/$1/device/driver) + fi } ## END OF FILE ################################################################# -- 2.1.4