summaryrefslogtreecommitdiffstats
path: root/network.py
diff options
context:
space:
mode:
Diffstat (limited to 'network.py')
-rw-r--r--network.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/network.py b/network.py
index 63acfa2bb..1596ef45e 100644
--- a/network.py
+++ b/network.py
@@ -115,6 +115,9 @@ class NetworkDevice(SimpleConfigFile):
for key in keys:
if key == 'ONBOOT' and forceOffOnBoot:
s = s + key + "=" + 'no' + "\n"
+ # make sure we include autoneg in the ethtool line
+ elif key == 'ETHTOOL_OPTS' and self.info[key].find("autoneg")== -1:
+ s = s + key + "=" + "autoneg off " + self.info[key] + "\n"
else:
s = s + key + "=" + self.info[key] + "\n"
@@ -365,7 +368,7 @@ class Network:
os.chmod(fn, 0644)
if len(dev.get("DESC")) > 0:
f.write("# %s\n" % (dev.get("DESC"),))
-
+
f.write(str(dev))
f.close()