From 5b434e2e7dfa8904b03dd9b5f9abf24aebaa5716 Mon Sep 17 00:00:00 2001 From: Ycarus Date: Thu, 15 Mar 2018 08:37:48 +0100 Subject: [PATCH] Fix ethtool usage for raspberry pi --- mptcp/files/etc/init.d/mptcp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp index 76764f1d3..1c23b39f4 100755 --- a/mptcp/files/etc/init.d/mptcp +++ b/mptcp/files/etc/init.d/mptcp @@ -22,7 +22,7 @@ global_multipath_settings() { } interface_multipath_settings() { - local mode iface name + local mode iface local config="$1" local intf="$2" @@ -32,9 +32,6 @@ interface_multipath_settings() { [ -n "$intf" ] && [ "$iface" != "$intf" ] && return 0 [ -z "$iface" ] && return 0 [ -n "$(ifconfig | grep $iface)" ] || return 0 - [ -n "$(ubus -v call system board | jsonfilter -e '$.board_name' | grep raspberry)" ] && { - ethtool --offload $iface rx off tx off - } config_get mode "$config" multipath "off" [ "$mode" = "master" ] && mode="on" @@ -89,12 +86,15 @@ load_interfaces() { start_service() { local intf=$1 - local id count boardname + local id count . /lib/functions.sh . /lib/functions/network.sh global_multipath_settings config_load network config_foreach interface_multipath_settings interface $intf + [ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep raspberry)" ] && { + ethtool --offload eth0 rx off tx off + } } reload_service() {