diff --git a/package/lean/autocore/files/autocore b/package/lean/autocore/files/autocore index 501b31e50d..f372db0a6d 100755 --- a/package/lean/autocore/files/autocore +++ b/package/lean/autocore/files/autocore @@ -35,29 +35,20 @@ start() mkdir -p /tmp/sysinfo echo $g > /tmp/sysinfo/model - ethtool -K eth0 rx-checksum on >/dev/null 2>&1 - ethtool -K eth0 tx-checksum-ip-generic on >/dev/null 2>&1 - ethtool -K eth0 tso on >/dev/null 2>&1 - ethtool -K eth0 ufo on >/dev/null 2>&1 - ethtool -K eth0 gso on >/dev/null 2>&1 - - ethtool -K eth1 rx-checksum on >/dev/null 2>&1 - ethtool -K eth1 tx-checksum-ip-generic on >/dev/null 2>&1 - ethtool -K eth1 tso on >/dev/null 2>&1 - ethtool -K eth1 ufo on >/dev/null 2>&1 - ethtool -K eth1 gso on >/dev/null 2>&1 - - ethtool -K eth2 rx-checksum on >/dev/null 2>&1 - ethtool -K eth2 tx-checksum-ip-generic on >/dev/null 2>&1 - ethtool -K eth2 tso on >/dev/null 2>&1 - ethtool -K eth2 ufo on >/dev/null 2>&1 - ethtool -K eth2 gso on >/dev/null 2>&1 - - ethtool -K eth3 rx-checksum on >/dev/null 2>&1 - ethtool -K eth3 tx-checksum-ip-generic on >/dev/null 2>&1 - ethtool -K eth3 tso on >/dev/null 2>&1 - ethtool -K eth3 ufo on >/dev/null 2>&1 - ethtool -K eth3 gso on >/dev/null 2>&1 + a=$(ip address | grep ^[0-9] | awk -F: '{print $2}' | sed "s/ //g" | grep '^[e]' | grep -v "@" | grep -v "\.") + b=$(echo "$a" | wc -l) + for i in $(seq 1 $b) + do + c=$(echo "$a" | sed -n ${i}p) + ethtool -K $c rx-checksum on >/dev/null 2>&1 + ethtool -K $c tx-checksum-ip-generic on >/dev/null 2>&1 || ( + ethtool -K $c tx-checksum-ipv4 on >/dev/null 2>&1 + ethtool -K $c tx-checksum-ipv6 on >/dev/null 2>&1) + ethtool -K $c tx-scatter-gather on >/dev/null 2>&1 + ethtool -K $c gso on >/dev/null 2>&1 + ethtool -K $c tso on >/dev/null 2>&1 + ethtool -K $c ufo on >/dev/null 2>&1 + done [ -f /etc/index.htm ] && mv /etc/index.htm /usr/lib/lua/luci/view/admin_status/index.htm }