garypang13 4 år sedan
förälder
incheckning
c7a4dadbd9

+ 1 - 1
.github/workflows/Openwrt-AutoBuild.yml

@@ -61,7 +61,7 @@ jobs:
 
     - name: Trigger Packages Update
       run: |
-        gitdate=$(curl -s "https://api.github.com/repos/kiddin9/openwrt-packages/actions/runs" | jq -r '.workflow_runs[0].updated_at')
+        gitdate=$(curl -s "https://api.github.com/repos/kiddin9/openwrt-packages/actions/runs" | jq -r '.workflow_runs[0].created_at')
         gitdate=$(date -d "$gitdate" +%s)
         now=$(date -d "$(date '+%Y-%m-%d %H:%M:%S')" +%s)
         if [[ $(expr $gitdate + 300) < $now ]]; then

+ 0 - 3
devices/common/default-settings

@@ -25,9 +25,6 @@ sed -i '/S99opkg/d' /etc/crontabs/root
 sec=$(awk 'BEGIN{srand();sum=rand()*60;printf("%d",sum)}')
 echo "$sec 4 * * * sh /etc/rc.d/S99opkg >/dev/null 2>&1" >> /etc/crontabs/root
 
-grep -q memclean /etc/crontabs/root ||
-	echo "*/30 * * * * sh /sbin/memclean >/dev/null 2>&1" >> /etc/crontabs/root
-
 cpuinfo=`/sbin/cpuinfo 2>/dev/null`
 test -n "$cpuinfo" || sed -i "s/_('CPU Info'),cpuinfo.cpufreq,//" /www/luci-static/resources/view/status/include/10_system.js
 

+ 0 - 1
devices/common/diy.sh

@@ -20,7 +20,6 @@ rm -rf target/linux/generic/hack-5.10/220-gc_sections.patch
 svn export --force https://github.com/immortalwrt/immortalwrt/branches/openwrt-21.02/package/network/services/ppp package/network/services/ppp
 svn export --force https://github.com/openwrt/openwrt/trunk/package/libs/libnfnetlink package/libs/libnfnetlink
 svn export --force https://github.com/immortalwrt/immortalwrt/branches/master/package/network/services/dnsmasq package/network/services/dnsmasq
-sed -i "s/'class': 'table'/'class': 'table memory'/g" package/*/*/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js
 sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite/' package/Makefile
 sed -i '$a /etc/sysupgrade.conf' package/base-files/files/lib/upgrade/keep.d/base-files-essential
 sed -i '$a /etc/amule' package/base-files/files/lib/upgrade/keep.d/base-files-essential

+ 13 - 18
devices/common/patches/status.patch

@@ -31,21 +31,6 @@
 +
  	setLocaltime = {
 
---- a/package/feeds/luci/luci-base/root/usr/libexec/rpcd/luci
-+++ b/package/feeds/luci/luci-base/root/usr/libexec/rpcd/luci
-@@ -358,7 +358,10 @@ local methods = {
- 		call = function(args)
- 			local util = require "luci.util"
- 
--			local swc, err = io.popen("swconfig dev %s show 2>/dev/null" % util.shellquote(args.switch))
-+			local swc, err = io.open("/tmp/SwconfigPortState", "r")
-+			if err then
-+				local swc, err = io.popen("swconfig dev %s show | tee /tmp/SwconfigPortState" % util.shellquote(args.switch))
-+			end
- 			if swc then
- 				local ports = { }
- 
-
 --- a/package/feeds/luci/luci-mod-system/root/usr/share/rpcd/acl.d/luci-mod-system.json
 +++ b/package/feeds/luci/luci-mod-system/root/usr/share/rpcd/acl.d/luci-mod-system.json
 @@ -3,7 +3,7 @@
@@ -156,12 +141,22 @@
 
 --- a/package/feeds/luci/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js
 +++ b/package/feeds/luci/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js
-@@ -32,7 +32,7 @@ return baseclass.extend({
+@@ -32,8 +32,7 @@ return baseclass.extend({
  		    swap = L.isObject(systeminfo.swap) ? systeminfo.swap : {};
  
  		var fields = [
 -			_('Total Available'), (mem.available) ? mem.available : (mem.total && mem.free && mem.buffered) ? mem.free + mem.buffered : null, mem.total,
- 			_('Used'),            (mem.total && mem.free) ? (mem.total - mem.free) : null, mem.total,
-+			_('Total Available'), (mem.available) ? mem.available : (mem.total && mem.free && mem.buffered) ? mem.free + mem.buffered : null, mem.total,
+-			_('Used'),            (mem.total && mem.free) ? (mem.total - mem.free) : null, mem.total,
++			_('Used'),            (mem.total && mem.free && mem.cached) ? (mem.total - mem.free - mem.cached) : null, mem.total,
  			_('Buffered'),        (mem.total && mem.buffered) ? mem.buffered : null, mem.total
  		];
+ 
+@@ -43,7 +42,7 @@ return baseclass.extend({
+ 		if (swap.total > 0)
+ 			fields.push(_('Swap free'), swap.free, swap.total);
+ 
+-		var table = E('table', { 'class': 'table' });
++		var table = E('table', { 'class': 'table memory' });
+ 
+ 		for (var i = 0; i < fields.length; i += 3) {
+ 			table.appendChild(E('tr', { 'class': 'tr' }, [