OSDN Git Service

autocore: fix build error&add missing rpcd
authorZiMing Mo <msylgj@immortalwrt.org>
Fri, 25 Mar 2022 21:32:52 +0000 (05:32 +0800)
committerZiMing Mo <msylgj@immortalwrt.org>
Fri, 25 Mar 2022 21:32:52 +0000 (05:32 +0800)
package/emortal/autocore/Makefile
package/emortal/autocore/files/generic/090-cover-index_files
package/emortal/autocore/files/generic/rpcd_luci-mod-status.json

index 0aea3e3..09f9dea 100644 (file)
@@ -35,15 +35,18 @@ define Build/Compile
 endef
 
 define Package/autocore/install/Default
-       $(INSTALL_DIR) $$(1)/etc
-       $(CP) ./files/generic/index.htm $$(1)/etc/
+       $(INSTALL_DIR) $(1)/etc
+       $(CP) ./files/generic/rpcd_10_system.js $(1)/etc/
+       $(CP) ./files/generic/rpcd_21_ethinfo.js $(1)/etc/
+       $(CP) ./files/generic/rpcd_luci $(1)/etc/
+       $(CP) ./files/generic/rpcd_luci-mod-status.json $(1)/etc/
 
        $(INSTALL_DIR) $(1)/etc/uci-defaults
-       $(INSTALL_BIN) ./files/generic/090-cover-index_htm $$(1)/etc/uci-defaults/
+       $(INSTALL_BIN) ./files/generic/090-cover-index_files $(1)/etc/uci-defaults/
 
        $(INSTALL_DIR) $(1)/sbin
-       $(INSTALL_BIN) ./files/generic/cpuinfo $$(1)/sbin/
-       $(INSTALL_BIN) ./files/generic/ethinfo $$(1)/sbin/
+       $(INSTALL_BIN) ./files/generic/cpuinfo $(1)/sbin/
+       $(INSTALL_BIN) ./files/generic/ethinfo $(1)/sbin/
 endef
 
 define Package/autocore-arm/install
index 0eab229..9d0afd2 100755 (executable)
@@ -2,6 +2,8 @@
 
 [ ! -f '/etc/rpcd_10_system.js' ] || \
        mv -f '/etc/rpcd_10_system.js' '/www/luci-static/resources/view/status/include/10_system.js'
+[ ! -f '/etc/rpcd_21_ethinfo.js' ] || \
+       mv -f '/etc/rpcd_21_ethinfo.js' '/www/luci-static/resources/view/status/include/21_ethinfo.js'
 [ ! -f '/etc/rpcd_luci' ] || \
        mv -f '/etc/rpcd_luci' '/usr/libexec/rpcd/luci'
 [ ! -f '/etc/rpcd_luci-mod-status.json' ] || \
index dc074a1..523ce17 100644 (file)
                                "file": [ "exec" ]
                        }
                }
+       },
+
+       "luci-mod-status-index": {
+               "description": "Grant access to main status display",
+               "read": {
+                       "file": {
+                               "/proc/sys/net/netfilter/nf_conntrack_count": [ "read" ],
+                               "/proc/sys/net/netfilter/nf_conntrack_max": [ "read" ],
+                               "/usr/lib/lua/luci/version.lua": [ "read" ],
+                               "/www/luci-static/resources/view/status/include": [ "list" ]
+                       },
+                       "ubus": {
+                               "file": [ "list", "read" ],
+                               "system": [ "board", "info" ]
+                       }
+               },
+               "write": {
+                       "uci": [ "dhcp" ]
+               }
+       },
+
+       "luci-mod-status-index-dhcp": {
+               "description": "Grant access to DHCP status display",
+               "read": {
+                       "ubus": {
+                               "luci-rpc": [ "getDHCPLeases" ]
+                       }
+               }
+       },
+
+       "luci-mod-status-index-dsl": {
+               "description": "Grant access to DSL status display",
+               "read": {
+                       "ubus": {
+                               "dsl": [ "metrics" ]
+                       }
+               }
+       },
+
+       "luci-mod-status-index-wifi": {
+               "description": "Grant access to wireless status display",
+               "read": {
+                       "ubus": {
+                               "iwinfo": [ "assoclist" ]
+                       }
+               },
+               "write": {
+                       "ubus": {
+                               "hostapd.*": [ "del_client", "wps_start", "wps_cancel", "wps_status" ]
+                       }
+               }
        }
 }