From 4ceb25fb4688da1f7d658b73de939922a4306277 Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Wed, 25 Dec 2019 09:10:10 +0800 Subject: [PATCH 1/4] luci-app-mtwifi: keep config on backup and upgrade (#2573) --- package/lean/mt/luci-app-mtwifi/Makefile | 4 ++++ .../lean/mt/luci-app-mtwifi/root/lib/upgrade/keep.d/mtwifi | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 package/lean/mt/luci-app-mtwifi/root/lib/upgrade/keep.d/mtwifi diff --git a/package/lean/mt/luci-app-mtwifi/Makefile b/package/lean/mt/luci-app-mtwifi/Makefile index eba484d61..6706a21bc 100644 --- a/package/lean/mt/luci-app-mtwifi/Makefile +++ b/package/lean/mt/luci-app-mtwifi/Makefile @@ -9,6 +9,10 @@ LUCI_PKGARCH:=all PKG_VERSION:=1 PKG_RELEASE:=8 +define Package/luci-app-mtwifi/conffiles +/etc/wireless/mt7615/ +endef + include $(TOPDIR)/feeds/luci/luci.mk # call BuildPackage - OpenWrt buildroot signature diff --git a/package/lean/mt/luci-app-mtwifi/root/lib/upgrade/keep.d/mtwifi b/package/lean/mt/luci-app-mtwifi/root/lib/upgrade/keep.d/mtwifi new file mode 100644 index 000000000..73cf64e8f --- /dev/null +++ b/package/lean/mt/luci-app-mtwifi/root/lib/upgrade/keep.d/mtwifi @@ -0,0 +1,2 @@ +/etc/wireless/mt7615/ + From 36837b9169f0f21f799596a6a674c35c710ef5d2 Mon Sep 17 00:00:00 2001 From: ZhenYu Date: Wed, 25 Dec 2019 09:10:43 +0800 Subject: [PATCH 2/4] luci-app-verysync: add button (#2569) * luci-app-verysync: add button * fix compatibility with LuCI2 * improve translation * improve translation * fix mistake --- package/lean/luci-app-verysync/Makefile | 2 +- .../luasrc/controller/verysync.lua | 11 ++--- .../luasrc/model/cbi/verysync.lua | 22 +++++---- .../luasrc/view/verysync/verysync_status.htm | 17 +++++-- .../luci-app-verysync/po/zh-cn/verysync.po | 13 ++--- .../root/etc/config/verysync | 4 +- .../root/etc/init.d/verysync | 48 +++++-------------- .../root/etc/uci-defaults/luci-verysync | 7 ++- 8 files changed, 52 insertions(+), 72 deletions(-) diff --git a/package/lean/luci-app-verysync/Makefile b/package/lean/luci-app-verysync/Makefile index 1bf0e67f9..7c37c8d84 100644 --- a/package/lean/luci-app-verysync/Makefile +++ b/package/lean/luci-app-verysync/Makefile @@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for Verysync LUCI_DEPENDS:=+verysync LUCI_PKGARCH:=all PKG_VERSION:=1.0 -PKG_RELEASE:=2 +PKG_RELEASE:=4 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-verysync/luasrc/controller/verysync.lua b/package/lean/luci-app-verysync/luasrc/controller/verysync.lua index 4dea43b90..04518d5bb 100644 --- a/package/lean/luci-app-verysync/luasrc/controller/verysync.lua +++ b/package/lean/luci-app-verysync/luasrc/controller/verysync.lua @@ -1,18 +1,17 @@ - module("luci.controller.verysync", package.seeall) function index() if not nixio.fs.access("/etc/config/verysync") then return end - + entry({"admin", "nas", "verysync"}, cbi("verysync"), _("Verysync"), 10).dependent = true entry({"admin","nas","verysync","status"},call("act_status")).leaf=true end function act_status() - local e={} - e.running=luci.sys.call("pgrep verysync >/dev/null")==0 - luci.http.prepare_content("application/json") - luci.http.write_json(e) + local e={} + e.running=luci.sys.call("pgrep verysync >/dev/null")==0 + luci.http.prepare_content("application/json") + luci.http.write_json(e) end diff --git a/package/lean/luci-app-verysync/luasrc/model/cbi/verysync.lua b/package/lean/luci-app-verysync/luasrc/model/cbi/verysync.lua index 20b74a04a..f8bfd26bb 100644 --- a/package/lean/luci-app-verysync/luasrc/model/cbi/verysync.lua +++ b/package/lean/luci-app-verysync/luasrc/model/cbi/verysync.lua @@ -1,20 +1,24 @@ -- Copyright 2008 Yanira +-- Copyright 2020 KFERMercer -- Licensed to the public under the Apache License 2.0. -require("nixio.fs") - -m = Map("verysync", translate("An Efficient Data Transfer Tool"), - translate("Simple and easy-to-use multi-platform file synchronization software, astonishing transmission speed is different from the greatest advantage of other products, micro-force synchronization of intelligent P2P technology to accelerate synchronization, will split the file into several KB-only data synchronization, and the file will be AES encryption processing.")) +m = Map("verysync") +m.title = translate("Verysync") +m.description = translate("Simple and easy-to-use multi-platform file synchronization software, astonishing transmission speed is different from the greatest advantage of other products. Micro-force synchronization of intelligent P2P technology to accelerate synchronization, will split the file into several KB-only data synchronization, and the file will be AES encryption processing.") m:section(SimpleSection).template = "verysync/verysync_status" -s = m:section(TypedSection, "setting", translate("Settings")) +s = m:section(TypedSection, "verysync") +s.addremove = false s.anonymous = true -s:option(Flag, "enabled", translate("Enable")) - -s:option(Value, "port", translate("port")).default = 8886 -s.rmempty = true +o = s:option(Flag, "enabled", translate("Enable")) +o.rmempty = false +o = s:option(Value, "port", translate("Port")) +o.datatype = "port" +o.placeholder = "8886" +o.default = "8886" +o.rmempty = false return m diff --git a/package/lean/luci-app-verysync/luasrc/view/verysync/verysync_status.htm b/package/lean/luci-app-verysync/luasrc/view/verysync/verysync_status.htm index 5564d75de..a0386ec31 100644 --- a/package/lean/luci-app-verysync/luasrc/view/verysync/verysync_status.htm +++ b/package/lean/luci-app-verysync/luasrc/view/verysync/verysync_status.htm @@ -1,17 +1,28 @@ diff --git a/package/lean/luci-app-verysync/po/zh-cn/verysync.po b/package/lean/luci-app-verysync/po/zh-cn/verysync.po index 03bc029c6..30b23ea82 100644 --- a/package/lean/luci-app-verysync/po/zh-cn/verysync.po +++ b/package/lean/luci-app-verysync/po/zh-cn/verysync.po @@ -1,13 +1,8 @@ msgid "Verysync" msgstr "微力同步" -msgid "An Efficient Data Transfer Tool" -msgstr "一款高效的数据传输工具" - -msgid "Simple and easy-to-use multi-platform file synchronization software, astonishing transmission speed is different from the greatest advantage of other products, micro-force synchronization of intelligent P2P technology to accelerate synchronization, will split the file into several KB-only data synchronization, and the file will be AES encryption processing." -msgstr "简单易用的多平台文件同步软件,惊人的传输速度是不同于其他产品的最大优势, 微力同步 的智能 P2P 技术加速同步,会将文件分割成若干份仅 KB 的数据同步,而文件都会进行 AES 加密处理。" - - - - +msgid "Simple and easy-to-use multi-platform file synchronization software, astonishing transmission speed is different from the greatest advantage of other products. Micro-force synchronization of intelligent P2P technology to accelerate synchronization, will split the file into several KB-only data synchronization, and the file will be AES encryption processing." +msgstr "简单易用的多平台文件同步软件, 惊人的传输速度是不同于其他产品的最大优势. 微力同步的智能 P2P 加速同步技术会将文件分割成若干份仅 KB 的数据进行传输, 同时会使用 AES 加密处理." +msgid "Open Verysync page" +msgstr "打开微力同步页面" diff --git a/package/lean/luci-app-verysync/root/etc/config/verysync b/package/lean/luci-app-verysync/root/etc/config/verysync index 5eba45b25..7d6720ee2 100644 --- a/package/lean/luci-app-verysync/root/etc/config/verysync +++ b/package/lean/luci-app-verysync/root/etc/config/verysync @@ -1,4 +1,2 @@ -config setting 'config' - option enabled '0' - option port '8886' +config verysync 'config' diff --git a/package/lean/luci-app-verysync/root/etc/init.d/verysync b/package/lean/luci-app-verysync/root/etc/init.d/verysync index 964305a61..a3a5bcc5d 100755 --- a/package/lean/luci-app-verysync/root/etc/init.d/verysync +++ b/package/lean/luci-app-verysync/root/etc/init.d/verysync @@ -1,43 +1,17 @@ #!/bin/sh /etc/rc.common + START=50 +STOP=10 -run_verysync() -{ - local enabled - config_get_bool enabled $1 enabled - if [ $enabled = 1 ]; then - local port - config_get port $1 port - state=`pgrep verysync | wc -l` - if [ $state = 0 ] ; then - export HOME="/root" - verysync -gui-address="0.0.0.0:$port" -logfile="/var/log/verysync.log" -no-browser >/dev/null & - echo "启动中..." - start=`pgrep verysync | wc -l` - if [ $start = 0 ] ; then - echo "启动失败" - else - echo "启动成功" - fi - else - echo "已在运行" - fi - fi +start() { + local enabled="$(uci get verysync.config.enabled)" + local port="$(uci get verysync.config.port)" + stop + [ "${enabled}" == "1" ] || exit 0 + export HOME="/root/" + verysync -gui-address="0.0.0.0:${port}" -logfile="/var/log/verysync.log" -home="/etc/verysync/" -no-browser >/dev/null 2>&1 & } -start() -{ - config_load verysync - config_foreach run_verysync setting -} - -stop() -{ - kill -9 `pgrep verysync` - stop=`pgrep verysync | wc -l` - if [ $stop = 0 ] ; then - echo "已停止运行" - else - echo "未停止运行" - fi +stop() { + kill -9 `pgrep verysync` >/dev/null 2>&1 } diff --git a/package/lean/luci-app-verysync/root/etc/uci-defaults/luci-verysync b/package/lean/luci-app-verysync/root/etc/uci-defaults/luci-verysync index c32f7ee3d..52e9dbffc 100755 --- a/package/lean/luci-app-verysync/root/etc/uci-defaults/luci-verysync +++ b/package/lean/luci-app-verysync/root/etc/uci-defaults/luci-verysync @@ -1,12 +1,11 @@ #!/bin/sh -touch /etc/config/verysync uci -q batch <<-EOF >/dev/null delete ucitrack.@verysync[-1] add ucitrack verysync - set ucitrack.@verysync[-1].exec='/etc/init.d/verysync restart' + set ucitrack.@verysync[-1].init=verysync commit ucitrack EOF -# remove LuCI cache -rm -f /tmp/luci* + +rm -f /tmp/luci-indexcache exit 0 From ec09a3ec1b776c4366750ae76d553a760b7ac5a4 Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Wed, 25 Dec 2019 09:11:18 +0800 Subject: [PATCH 3/4] pdnsd-alt: fix building on macOS (#2568) Closes #2536 --- package/lean/pdnsd-alt/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/lean/pdnsd-alt/Makefile b/package/lean/pdnsd-alt/Makefile index bbe3ebf51..1d69a96a0 100644 --- a/package/lean/pdnsd-alt/Makefile +++ b/package/lean/pdnsd-alt/Makefile @@ -38,7 +38,8 @@ TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include CMAKE_OPTIONS += -DDEBUG=1 CONFIGURE_ARGS += \ - --with-cachedir=/var/pdnsd + --with-cachedir=/var/pdnsd \ + --with-target=Linux define Package/pdnsd-alt/install $(INSTALL_DIR) $(1)/usr/sbin From 87f94af11323cd9d5333b5265214e617d784c231 Mon Sep 17 00:00:00 2001 From: small_5 <30542017+small-5@users.noreply.github.com> Date: Wed, 25 Dec 2019 09:12:34 +0800 Subject: [PATCH 4/4] Update autocore (#2571) --- package/lean/autocore/files/autocore | 37 +++++++++++----------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/package/lean/autocore/files/autocore b/package/lean/autocore/files/autocore index 501b31e50..f372db0a6 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 }