From 1c9487ff01eb19005d07c0950ec4c7ba2f5e2549 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 25 Jul 2022 20:22:27 +0800 Subject: [PATCH] update 2022-07-25 20:22:27 --- linkease/Makefile | 4 +- luci-app-amlogic/Makefile | 2 +- .../luci-static/resources/amlogic/switch.png | Bin 0 -> 4118 bytes .../luasrc/controller/amlogic.lua | 8 +++ .../model/cbi/amlogic/amlogic_backup.lua | 25 +++++++-- .../luasrc/view/amlogic/other_kvm.htm | 48 ++++++++++++++++++ luci-app-amlogic/po/zh-cn/amlogic.po | 21 ++++++++ luci-app-amlogic/root/usr/sbin/openwrt-backup | 11 ++-- luci-app-nft-qos/po/de/nft-qos.po | 12 +++-- luci-app-nft-qos/po/pt/nft-qos.po | 10 ++-- 10 files changed, 122 insertions(+), 19 deletions(-) create mode 100644 luci-app-amlogic/htdocs/luci-static/resources/amlogic/switch.png create mode 100644 luci-app-amlogic/luasrc/view/amlogic/other_kvm.htm diff --git a/linkease/Makefile b/linkease/Makefile index 727af7c67..b63801e6a 100644 --- a/linkease/Makefile +++ b/linkease/Makefile @@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk PKG_ARCH_LINKEASE:=$(ARCH) PKG_NAME:=linkease -PKG_VERSION:=0.7.7 +PKG_VERSION:=0.8.1 PKG_RELEASE:=$(PKG_ARCH_LINKEASE)-1 PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://fw.koolcenter.com/binary/LinkEase/LinuxStorage/ -PKG_HASH:=2d98b1c704afafca49623e6b3b32ba4d4251dd5822dfdc29bc4613cc782568f0 +PKG_HASH:=4bfc6e916324d305ad3309cb46ad78c6e356bca79b4cef75accf82b018600105 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION) diff --git a/luci-app-amlogic/Makefile b/luci-app-amlogic/Makefile index 241e44897..d7557d475 100644 --- a/luci-app-amlogic/Makefile +++ b/luci-app-amlogic/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-amlogic -PKG_VERSION:=3.1.108 +PKG_VERSION:=3.1.110 PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0 License diff --git a/luci-app-amlogic/htdocs/luci-static/resources/amlogic/switch.png b/luci-app-amlogic/htdocs/luci-static/resources/amlogic/switch.png new file mode 100644 index 0000000000000000000000000000000000000000..2a3577a9dc0c324c8fa1651159edbfbcf197559e GIT binary patch literal 4118 zcmcInc{r5o`+tc+aZqFkjY-AHn8ob&ox`X^md=USJ1-_?IWvPnBxR4X-#-d|NQ2<-fN!co%{aWpZjy)&;4AJvC7L;ZLZ#2 z007k7-JHCUZ;b3wMgf4FLc(t$$VNrr79awEc?)EZ98k0u4FD)_j*q|CpXJGf_*`?4 z%@2XiC0qew4FFcQ5&;NBz+y}Y9LC{UV<+mHu^0~98tX@45m*98IGp1aCxq9;dHFzb z5fFoowY9-mNtg%#7Z!sU2{)1_VoI#BUvZhpTJ{=`#e6jpM_6O+WdSk%tW_9Cz7WPx z%&9ntNTy?G409rtOt7GuVMqib15cpii555lkx8I3DKyON2a7}#vO}5PPA;>tkexL) zTr3ta@%WgS81onlbG|SPPh>C<3=*D1!XXwoQ7lgkN^m^UlJ5vkum}=z1Y!=Khmj$I zA^a$@H5Os|Ed{RN2P{uCD-$9ZUIGg6M00{HrSFC;)<2taxj(E$V&`Zi$}Hdi2rTl6 z6~K6JSj3MKLa=i*%o8v99!wC<7xP8o{Qtu3$It(ZAshM;P!J`I{3;I{!o!g;7r_=G zw#2Xe1WZRE42t}1R9P+ z@gWkJWHOULTS1^R350K^ETj|Ipcwo)V?LV`8v8S*EEdz9ClZ4^2zGa}#v-K5IUF{V z2ou;u2Ahlnscw-c#ezh^Q9vX?h(xC17?1@8#~_802^4xLJCscMjqebUK5Cg9#)8()?sXC;`S|{uS4eAITT8_-sU73oM2WF+=%6E{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{zOK|NZC?NMP-jcVf%K^7f5TcjI;9&nY)I~Tc2V$_p|I}B;vAIJG*f=@;!?f* zD+Mu=Pu!_wvY4i6bfI0vcd$7zGOmD;^YQ*$IZs?D(EUuzH#Robw~l`k`3k8m7_lxw z^t3GuYp3vApY2qwp_O;O=Vxixkdo{5ahC_u6x%|o&J+5O=E@wm`hXp6FH^;Q)V+(@<&p_<(JL5KR`G;z+ac*x;R1A34m0SG16dy z6^%}pgn4*eo0FKBsAy_x>iSemnj0Uj0P?tb!N83%(^8*yjj<@DwJBEWDNZ$iL~Q=- zV(D{FW%cs?2M^@mVZj$t@}75 z%&LrKPUw7|@06tl|jm$*3&w(q@WnL4?04B$N zjY>s!R`-&RArbKHVM>tN$yB!_#}*dLziST3abrPsbnAu*_=;xTi5K`C^M;|U%*?B3 zs4(VjQ+`olVWBQs%irmgn!a*=$>)KNB?C@|I-?i5`@@nkM|X&!ZgTd%aQ~twTaMTL z{m^(*>eB561Jk<~0qE4!Vtt@4=~9+X>BPiDzj*Z4vDVPj=Xyg=7jMhR*?hocfc}el z*_`4#A6EA=)d#P;DarKr4}>nWcljfIxC<>NUMCDdkOYF&ztE&Da4+@27^h4AR+bb|lbxWrbhmr`po6Et*=DO!S&UJ3f@3+hEJ3g>)@Ww4-W&vyIt_a3?HI=is zD04?7NA(7q&2R5DHOZ7ear=B%FkuYZ*3#eKFC4#LyVStIVC|+&GcQZ}7PXx{D+w$t zl7<{~Esc+zIOkWXey)7H*O69{rPQ_cvYX?B)6H4E^9@1@HH`MS QWdGdVoxPkY9fFhp2jsV*TmS$7 literal 0 HcmV?d00001 diff --git a/luci-app-amlogic/luasrc/controller/amlogic.lua b/luci-app-amlogic/luasrc/controller/amlogic.lua index eb2c87017..6288ef7da 100644 --- a/luci-app-amlogic/luasrc/controller/amlogic.lua +++ b/luci-app-amlogic/luasrc/controller/amlogic.lua @@ -44,6 +44,7 @@ function index() entry({ "admin", "system", "amlogic", "start_openwrt_author" }, call("action_openwrt_author")).leaf = true entry({ "admin", "system", "amlogic", "state" }, call("action_state")).leaf = true entry({ "admin", "system", "amlogic", "start_poweroff" }, call("action_poweroff")).leaf = true + entry({ "admin", "system", "amlogic", "start_switch" }, call("action_switch")).leaf = true end --Remove the spaces in the string @@ -450,3 +451,10 @@ end function action_poweroff() luci.sys.exec("/sbin/poweroff") end + +--Switching dual partition +function action_switch() + luci.sys.exec("[ -f /boot/efi/EFI/BOOT/grub.cfg.prev ] && (cd /boot/efi/EFI/BOOT/ && mv -f grub.cfg grub.cfg.bak && mv -f grub.cfg.prev grub.cfg && mv -f grub.cfg.bak grub.cfg.prev)") + luci.sys.exec("sync && reboot") +end + diff --git a/luci-app-amlogic/luasrc/model/cbi/amlogic/amlogic_backup.lua b/luci-app-amlogic/luasrc/model/cbi/amlogic/amlogic_backup.lua index 9a232a369..a3a008c90 100644 --- a/luci-app-amlogic/luasrc/model/cbi/amlogic/amlogic_backup.lua +++ b/luci-app-amlogic/luasrc/model/cbi/amlogic/amlogic_backup.lua @@ -5,13 +5,20 @@ local io = require "io" local os = require "os" local fs = require "nixio.fs" -local b, c +local b, c, x -- Checks wheather the given path exists and points to a directory. function isdirectory(dirname) return fs.stat(dirname, "type") == "dir" end +-- Check if a file or directory exists +function file_exists(path) + local file = io.open(path, "rb") + if file then file:close() end + return file ~= nil +end + --SimpleForm for Backup Config b = SimpleForm("backup", nil) b.title = translate("Backup Firmware Config") @@ -90,10 +97,22 @@ w.render = function(self, section, scope) end w.write = function(self, section, scope) - local x = luci.sys.exec("btrfs subvolume snapshot -r /etc /.snapshots/etc-" .. os.date("%m.%d.%H%M%S") .. " 2>/dev/null && sync") + local x = luci.sys.exec("btrfs subvolume snapshot -r /etc /.snapshots/etc-" .. + os.date("%m.%d.%H%M%S") .. " 2>/dev/null && sync") luci.http.redirect(luci.dispatcher.build_url("admin", "system", "amlogic", "backup")) end w = d:option(TextValue, "snapshot_list", nil) w.template = "amlogic/other_snapshot" -return b, c +--KVM virtual machine switching dual partition +if file_exists("/boot/efi/EFI/BOOT/grub.cfg.prev") then + x = SimpleForm("kvm", nil) + x.title = translate("KVM dual system switching") + x.description = translate("You can freely switch between KVM dual partitions, using OpenWrt systems in different partitions.") + x.reset = false + x.submit = false + + x:section(SimpleSection).template = "amlogic/other_kvm" +end + +return b, c, x diff --git a/luci-app-amlogic/luasrc/view/amlogic/other_kvm.htm b/luci-app-amlogic/luasrc/view/amlogic/other_kvm.htm new file mode 100644 index 000000000..710fe55d7 --- /dev/null +++ b/luci-app-amlogic/luasrc/view/amlogic/other_kvm.htm @@ -0,0 +1,48 @@ + +
+ + +
+ +

+ <%:Loading%> + + <%:System is switching...%> +

+
+
+ + diff --git a/luci-app-amlogic/po/zh-cn/amlogic.po b/luci-app-amlogic/po/zh-cn/amlogic.po index dca27d51b..fe2881d3f 100644 --- a/luci-app-amlogic/po/zh-cn/amlogic.po +++ b/luci-app-amlogic/po/zh-cn/amlogic.po @@ -284,6 +284,27 @@ msgstr "瑞芯微 3328 -- [ 贝壳云、我家云 ]" msgid "Used in KVM ----- [ Can be used in KVM virtual machine of Armbian system. ]" msgstr "KVM 中使用 --- [ 可以在 Armbia 系统的 KVM 虚拟机中使用。 ]" +msgid "KVM dual system switching" +msgstr "KVM 双系统切换" + +msgid "You can freely switch between KVM dual partitions, using OpenWrt systems in different partitions." +msgstr "您可以在 KVM 双分区之间自由切换,使用不同分区中的 OpenWrt 系统。" + +msgid "Switch System" +msgstr "切换系统" + +msgid "System is switching..." +msgstr "系统切换中..." + +msgid "Waiting for system switching..." +msgstr "等待系统完成切换..." + +msgid "System switchover succeeded, restarting..." +msgstr "系统切换成功,正在重启..." + +msgid "Are you sure you want to switch systems?" +msgstr "你确定要切换系统吗?" + msgid "Install Ipk" msgstr "安装Ipk" diff --git a/luci-app-amlogic/root/usr/sbin/openwrt-backup b/luci-app-amlogic/root/usr/sbin/openwrt-backup index 50ae9ed1f..e0658c482 100755 --- a/luci-app-amlogic/root/usr/sbin/openwrt-backup +++ b/luci-app-amlogic/root/usr/sbin/openwrt-backup @@ -5,7 +5,7 @@ # Copyright (C) 2021-- https://github.com/ophub/luci-app-amlogic #====================================================================== -VERSION="v1.2" +VERSION="v1.3" ZSTD_LEVEL=6 SNAPSHOT_PRESTR=".snapshots/" BACKUP_DIR="/.reserved" @@ -81,8 +81,13 @@ elif dmesg | grep 'rockchip' >/dev/null 2>&1; then elif dmesg | grep 'sun50i-h6' >/dev/null 2>&1; then PLATFORM="allwinner" else - echo "Unknown platform, only support amlogic or rockchip or allwinner h6!" - exit 1 + source /etc/flippy-openwrt-release + case $PLATFORM in + amlogic|rockchip|allwinner|qemu-aarch64) : ;; + *) echo "Unknown platform, only support amlogic or rockchip or allwinner h6 or qemu-aarch64!" + exit 1 + ;; + esac fi backup() { diff --git a/luci-app-nft-qos/po/de/nft-qos.po b/luci-app-nft-qos/po/de/nft-qos.po index 789305ff8..831812f5f 100644 --- a/luci-app-nft-qos/po/de/nft-qos.po +++ b/luci-app-nft-qos/po/de/nft-qos.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2022-02-24 06:56+0000\n" +"PO-Revision-Date: 2022-07-21 13:22+0000\n" "Last-Translator: ssantos \n" "Language-Team: German \n" @@ -8,7 +8,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.11-dev\n" +"X-Generator: Weblate 4.14-dev\n" #: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:136 #: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:155 @@ -121,12 +121,14 @@ msgid "Limit Enable" msgstr "Limit aktivieren" #: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:33 +#, fuzzy msgid "Limit Rate by IP Address" -msgstr "" +msgstr "Quote pro IP-Adresse begrenzen" #: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:34 +#, fuzzy msgid "Limit Rate by Mac Address" -msgstr "" +msgstr "Quote pro MAC-Adresse begrenzen" #: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:239 msgid "Limit Traffic Rate By Mac Address" @@ -236,7 +238,7 @@ msgstr "" #: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:35 msgid "Traffic Priority" -msgstr "" +msgstr "Traffic-Priorität" #: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:199 msgid "Traffic Priority Settings" diff --git a/luci-app-nft-qos/po/pt/nft-qos.po b/luci-app-nft-qos/po/pt/nft-qos.po index 3147ecb68..c5cde5cd2 100644 --- a/luci-app-nft-qos/po/pt/nft-qos.po +++ b/luci-app-nft-qos/po/pt/nft-qos.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-09-18 18:36+0000\n" +"PO-Revision-Date: 2022-07-20 17:18+0000\n" "Last-Translator: ssantos \n" "Language-Team: Portuguese \n" @@ -8,7 +8,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.3-dev\n" +"X-Generator: Weblate 4.14-dev\n" #: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:136 #: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:155 @@ -122,11 +122,11 @@ msgstr "Limitar Ativação" #: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:33 msgid "Limit Rate by IP Address" -msgstr "" +msgstr "Limite da taxa por endereço IP" #: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:34 msgid "Limit Rate by Mac Address" -msgstr "" +msgstr "Limite da taxa por endereço Mac" #: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:239 msgid "Limit Traffic Rate By Mac Address" @@ -233,7 +233,7 @@ msgstr "" #: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:35 msgid "Traffic Priority" -msgstr "" +msgstr "Prioridade de tráfego" #: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:199 msgid "Traffic Priority Settings"