summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Hendry <jhendry@mintel.com>2014-10-29 17:50:59 +0000
committerJason Hendry <jhendry@mintel.com>2014-10-29 17:50:59 +0000
commitd5abe669e936f67df62554b6c8fafded32836e4d (patch)
treeab6f67bb475f0a645e572b2982c6197086b29104
parent34b43c530857bb7bd7407b3ae8964405342b6a2d (diff)
downloadvyatta-cfg-system-d5abe669e936f67df62554b6c8fafded32836e4d.tar.gz
vyatta-cfg-system-d5abe669e936f67df62554b6c8fafded32836e4d.zip
Cleaning up ethtool execution code
-rwxr-xr-xscripts/vyatta-interfaces.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 14f0a125..9271e871 100755
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -603,15 +603,15 @@ sub set_offload_setting {
'udp-segmentation-offload' => 'ufo',
);
- $args = "$ethtool_opts{$option} $nvalue" if (defined($nvalue) && $nvalue ne $ovalue);
+ if (defined($nvalue) && $nvalue ne $ovalue) {
- if ($args ne '') {
- my $cmd = "$ETHTOOL -K $intf $args";
+ my $cmd = "$ETHTOOL -K $intf $ethtool_opts{$option} $nvalue";
system($cmd);
if ($? >> 8) {
die "exec of $ETHTOOL failed: '$cmd'";
}
}
+
}