diff options
Diffstat (limited to 'ethtool-cmd.py')
-rwxr-xr-x | ethtool-cmd.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ethtool-cmd.py b/ethtool-cmd.py index 421e066..e828bce 100755 --- a/ethtool-cmd.py +++ b/ethtool-cmd.py @@ -79,10 +79,15 @@ def show_driver(interface, args = None): def run_cmd(cmd, interface, args): global tab + + active_devices = ethtool.get_active_devices() if not interface: tab = " " for interface in ethtool.get_devices(): - print "%s:" % interface + inactive = " (not active)" + if interface in active_devices: + inactive = "" + print "%s%s:" % (interface, inactive) cmd(interface, args) else: cmd(interface, args) |