From d5abe669e936f67df62554b6c8fafded32836e4d Mon Sep 17 00:00:00 2001 From: Jason Hendry Date: Wed, 29 Oct 2014 17:50:59 +0000 Subject: Cleaning up ethtool execution code --- scripts/vyatta-interfaces.pl | 6 +++--- 1 file 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'"; } } + } -- cgit v1.2.3