From f2ca377c2a92e1036c4ff942bd61d3e4bb4f4a18 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 15 Sep 2019 14:26:54 +0200 Subject: Python/ifconfig: T1557: call ethtool with full path --- python/vyos/ifconfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py index fe3cd20ef..9e6c27430 100644 --- a/python/vyos/ifconfig.py +++ b/python/vyos/ifconfig.py @@ -1096,7 +1096,7 @@ class EthernetIf(VLANIf): # Assemble command executed on system. Unfortunately there is no way # to change this setting via sysfs - cmd = 'ethtool --pause {0} autoneg {1} tx {1} rx {1}'.format( + cmd = '/sbin/ethtool --pause {0} autoneg {1} tx {1} rx {1}'.format( self._ifname, enable) try: # An exception will be thrown if the settings are not changed @@ -1118,7 +1118,7 @@ class EthernetIf(VLANIf): if duplex not in ['auto', 'full', 'half']: raise ValueError("Value out of range (duplex)") - cmd = 'ethtool -s {}'.format(self._ifname) + cmd = '/sbin/ethtool -s {}'.format(self._ifname) if speed == 'auto' or duplex == 'auto': cmd += ' autoneg on' else: -- cgit v1.2.3