summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-15 14:26:54 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-20 21:28:53 +0200
commitf2ca377c2a92e1036c4ff942bd61d3e4bb4f4a18 (patch)
tree3fd284e2028815e9c04f23739c96ff33ecf95476 /python
parent822976ac1c6972da38c7cb47dfdfdcee75a68457 (diff)
downloadvyos-1x-f2ca377c2a92e1036c4ff942bd61d3e4bb4f4a18.tar.gz
vyos-1x-f2ca377c2a92e1036c4ff942bd61d3e4bb4f4a18.zip
Python/ifconfig: T1557: call ethtool with full path
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig.py4
1 files changed, 2 insertions, 2 deletions
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: