autocore: fix on newer LuCI
This commit is contained in:
parent
68a041805e
commit
20097d7996
@ -9,15 +9,14 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=autocore
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=26
|
||||
|
||||
PKG_RELEASE:=27
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/autocore
|
||||
TITLE:=x86/x64 auto core loadbalance script.
|
||||
MAINTAINER:=Lean
|
||||
DEPENDS:=@BROKEN @TARGET_x86 +bc +lm-sensors +ethtool
|
||||
MAINTAINER:=Lean / [CTCGFW] Project OpenWrt
|
||||
DEPENDS:=@TARGET_x86 +bc +lm-sensors +ethtool
|
||||
endef
|
||||
|
||||
define Package/autocore/description
|
||||
@ -30,7 +29,7 @@ endef
|
||||
define Package/autocore/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_BIN) ./files/rpcd_luci $(1)/etc/rpcd_luci
|
||||
$(INSTALL_DATA) ./files/rpcd_luci-base.json $(1)/etc/rpcd_luci-base.json
|
||||
$(INSTALL_DATA) ./files/rpcd_luci-mod-status.json $(1)/etc/rpcd_luci-mod-status.json
|
||||
$(INSTALL_DATA) ./files/rpcd_10_system.js $(1)/etc/rpcd_10_system.js
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/autocore $(1)/etc/init.d/autocore
|
||||
|
||||
@ -51,6 +51,6 @@ start()
|
||||
done
|
||||
|
||||
[ -f '/etc/rpcd_luci' ] && mv -f '/etc/rpcd_luci' '/usr/libexec/rpcd/luci'
|
||||
[ -f '/etc/rpcd_luci-base.json' ] && { mv -f '/etc/rpcd_luci-base.json' '/usr/share/rpcd/acl.d/luci-base.json'; /etc/init.d/rpcd restart; }
|
||||
[ -f '/etc/rpcd_luci-mod-status.json' ] && { mv -f '/etc/rpcd_luci-mod-status.json' '/usr/share/rpcd/acl.d/luci-mod-status.json'; /etc/init.d/rpcd restart; }
|
||||
[ -f '/etc/rpcd_10_system.js' ] && mv -f '/etc/rpcd_10_system.js' '/www/luci-static/resources/view/status/include/10_system.js'
|
||||
}
|
||||
|
||||
@ -1,128 +0,0 @@
|
||||
{
|
||||
"unauthenticated": {
|
||||
"description": "Allow system feature probing",
|
||||
"read": {
|
||||
"ubus": {
|
||||
"luci": [ "getFeatures" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"uci-access": {
|
||||
"description": "Grant uci write access to all configurations",
|
||||
"read": {
|
||||
"uci": [ "*" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "*" ]
|
||||
}
|
||||
},
|
||||
"luci-access": {
|
||||
"description": "Grant access to basic LuCI procedures",
|
||||
"read": {
|
||||
"cgi-io": [ "backup", "download", "exec" ],
|
||||
"file": {
|
||||
"/": [ "list" ],
|
||||
"/*": [ "list" ],
|
||||
"/dev/mtdblock*": [ "read" ],
|
||||
"/etc/crontabs/root": [ "read" ],
|
||||
"/etc/dropbear/authorized_keys": [ "read" ],
|
||||
"/etc/filesystems": [ "read" ],
|
||||
"/etc/rc.local": [ "read" ],
|
||||
"/etc/sysupgrade.conf": [ "read" ],
|
||||
"/etc/passwd": [ "read" ],
|
||||
"/etc/group": [ "read" ],
|
||||
"/proc/filesystems": [ "read" ],
|
||||
"/proc/mtd": [ "read" ],
|
||||
"/proc/partitions": [ "read" ],
|
||||
"/proc/sys/kernel/hostname": [ "read" ],
|
||||
"/proc/sys/net/netfilter/nf_conntrack_*": [ "read" ],
|
||||
"/proc/mounts": [ "read" ],
|
||||
"/usr/lib/lua/luci/version.lua": [ "read" ],
|
||||
"/bin/dmesg -r": [ "exec" ],
|
||||
"/bin/ping *": [ "exec" ],
|
||||
"/bin/ping6 *": [ "exec" ],
|
||||
"/bin/traceroute *": [ "exec" ],
|
||||
"/bin/traceroute6 *": [ "exec" ],
|
||||
"/sbin/ip -4 neigh show": [ "exec" ],
|
||||
"/sbin/ip -4 route show table all": [ "exec" ],
|
||||
"/sbin/ip -6 neigh show": [ "exec" ],
|
||||
"/sbin/ip -6 route show table all": [ "exec" ],
|
||||
"/sbin/logread -e ^": [ "exec" ],
|
||||
"/usr/bin/ping *": [ "exec" ],
|
||||
"/usr/bin/ping6 *": [ "exec" ],
|
||||
"/usr/bin/traceroute *": [ "exec" ],
|
||||
"/usr/bin/traceroute6 *": [ "exec" ],
|
||||
"/usr/bin/nslookup *": [ "exec" ],
|
||||
"/usr/libexec/luci-peeraddr": [ "exec" ],
|
||||
"/usr/sbin/iptables --line-numbers -w -nvxL -t *": [ "exec" ],
|
||||
"/usr/sbin/ip6tables --line-numbers -w -nvxL -t *": [ "exec" ]
|
||||
},
|
||||
"ubus": {
|
||||
"file": [ "list", "read", "stat" ],
|
||||
"iwinfo": [ "assoclist", "freqlist", "txpowerlist", "countrylist" ],
|
||||
"luci": [ "getConntrackList", "getInitList", "getLocaltime", "getProcessList", "getRealtimeStats", "getTimezones", "getLEDs", "getUSBDevices", "getSwconfigFeatures", "getSwconfigPortState", "getBlockDevices", "getMountPoints", "getCPUBench", "getCPUInfo", "getCPUUsage", "getETHInfo", "getOnlineUsers" ],
|
||||
"luci-rpc": [ "getBoardJSON", "getDHCPLeases", "getDSLStatus", "getDUIDHints", "getHostHints", "getNetworkDevices", "getWirelessDevices" ],
|
||||
"network.interface": [ "dump" ],
|
||||
"network.rrdns": [ "lookup" ],
|
||||
"network": [ "get_proto_handlers" ],
|
||||
"system": [ "board", "info", "validate_firmware_image" ],
|
||||
"uci": [ "changes", "get" ]
|
||||
},
|
||||
"uci": [ "*" ]
|
||||
},
|
||||
"write": {
|
||||
"cgi-io": [ "upload" ],
|
||||
"file": {
|
||||
"/etc/crontabs/root": [ "write" ],
|
||||
"/etc/dropbear/authorized_keys": [ "write" ],
|
||||
"/etc/init.d/firewall restart": [ "exec" ],
|
||||
"/etc/luci-uploads/*": [ "write" ],
|
||||
"/etc/rc.local": [ "write" ],
|
||||
"/etc/sysupgrade.conf": [ "write" ],
|
||||
"/sbin/block": [ "exec" ],
|
||||
"/sbin/firstboot": [ "exec" ],
|
||||
"/sbin/ifdown": [ "exec" ],
|
||||
"/sbin/ifup": [ "exec" ],
|
||||
"/sbin/reboot": [ "exec" ],
|
||||
"/sbin/sysupgrade": [ "exec" ],
|
||||
"/sbin/wifi": [ "exec" ],
|
||||
"/bin/kill": [ "exec" ],
|
||||
"/bin/tar": [ "exec" ],
|
||||
"/bin/umount": [ "exec" ],
|
||||
"/tmp/backup.tar.gz": [ "write" ],
|
||||
"/tmp/firmware.bin": [ "write" ],
|
||||
"/tmp/upload.ipk": [ "write" ],
|
||||
"/usr/sbin/iptables -Z": [ "exec" ],
|
||||
"/usr/sbin/ip6tables -Z": [ "exec" ]
|
||||
},
|
||||
"ubus": {
|
||||
"file": [ "write", "remove", "exec" ],
|
||||
"hostapd.*": [ "del_client" ],
|
||||
"iwinfo": [ "scan" ],
|
||||
"luci": [ "setInitAction", "setLocaltime", "setPassword", "setBlockDetect" ],
|
||||
"uci": [ "add", "apply", "confirm", "delete", "order", "set", "rename" ]
|
||||
},
|
||||
"uci": [ "*" ]
|
||||
}
|
||||
},
|
||||
"luci-app-firewall": {
|
||||
"description": "Grant access to firewall procedures",
|
||||
"read": {
|
||||
"file": {
|
||||
"/etc/firewall.user": [ "read" ]
|
||||
},
|
||||
"ubus": {
|
||||
"luci": [ "getConntrackHelpers" ]
|
||||
},
|
||||
"uci": [ "firewall" ]
|
||||
},
|
||||
"write": {
|
||||
"file": {
|
||||
"/etc/firewall.user": [ "write" ],
|
||||
"/etc/init.d/firewall": [ "exec" ]
|
||||
},
|
||||
"uci": [ "firewall" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
132
package/lean/autocore/files/rpcd_luci-mod-status.json
Normal file
132
package/lean/autocore/files/rpcd_luci-mod-status.json
Normal file
@ -0,0 +1,132 @@
|
||||
{
|
||||
"luci-mod-status-realtime": {
|
||||
"description": "Grant access to realtime statistics",
|
||||
"read": {
|
||||
"ubus": {
|
||||
"luci": [ "getConntrackList", "getRealtimeStats", "getCPUBench", "getCPUInfo", "getCPUUsage", "getETHInfo", "getOnlineUsers" ],
|
||||
"network.rrdns": [ "lookup" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"luci-mod-status-processes": {
|
||||
"description": "Grant access to process status",
|
||||
"read": {
|
||||
"ubus": {
|
||||
"luci": [ "getProcessList" ]
|
||||
}
|
||||
},
|
||||
"write": {
|
||||
"file": {
|
||||
"/bin/kill": [ "exec" ]
|
||||
},
|
||||
"ubus": {
|
||||
"file": [ "exec" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"luci-mod-status-logs": {
|
||||
"description": "Grant access to system logs",
|
||||
"read": {
|
||||
"cgi-io": [ "exec" ],
|
||||
"file": {
|
||||
"/bin/dmesg -r": [ "exec" ],
|
||||
"/sbin/logread": [ "stat" ],
|
||||
"/sbin/logread -e ^": [ "exec" ],
|
||||
"/usr/sbin/logread": [ "stat" ],
|
||||
"/usr/sbin/logread -e ^": [ "exec" ]
|
||||
},
|
||||
"ubus": {
|
||||
"file": [ "stat" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"luci-mod-status-routes": {
|
||||
"description": "Grant access to the system route status",
|
||||
"read": {
|
||||
"file": {
|
||||
"/sbin/ip -[46] neigh show": [ "exec" ],
|
||||
"/sbin/ip -[46] route show table all": [ "exec" ]
|
||||
},
|
||||
"ubus": {
|
||||
"file": [ "exec" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"luci-mod-status-firewall": {
|
||||
"description": "Grant access to firewall status",
|
||||
"read": {
|
||||
"cgi-io": [ "exec" ],
|
||||
"file": {
|
||||
"/usr/sbin/iptables --line-numbers -w -nvxL -t *": [ "exec" ],
|
||||
"/usr/sbin/ip6tables --line-numbers -w -nvxL -t *": [ "exec" ],
|
||||
"/usr/sbin/ip6tables": [ "list" ]
|
||||
},
|
||||
"ubus": {
|
||||
"file": [ "stat" ]
|
||||
}
|
||||
},
|
||||
"write": {
|
||||
"cgi-io": [ "exec" ],
|
||||
"file": {
|
||||
"/etc/init.d/firewall restart": [ "exec" ],
|
||||
"/usr/sbin/iptables -Z": [ "exec" ],
|
||||
"/usr/sbin/ip6tables -Z": [ "exec" ]
|
||||
},
|
||||
"ubus": {
|
||||
"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" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"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": {
|
||||
"luci-rpc": [ "getDSLStatus" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"luci-mod-status-index-wifi": {
|
||||
"description": "Grant access to wireless status display",
|
||||
"read": {
|
||||
"ubus": {
|
||||
"iwinfo": [ "assoclist" ]
|
||||
}
|
||||
},
|
||||
"write": {
|
||||
"ubus": {
|
||||
"hostapd.*": [ "del_client" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user