mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
questd: 5.2.2
disable network module simulate router.network object via rpcd script to support juci clients widget
This commit is contained in:
parent
22e2cb491a
commit
083fd0376f
2 changed files with 56 additions and 2 deletions
|
|
@ -6,9 +6,9 @@ include $(TOPDIR)/rules.mk
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=questd
|
PKG_NAME:=questd
|
||||||
PKG_VERSION:=5.2.1
|
PKG_VERSION:=5.2.2
|
||||||
|
|
||||||
PKG_SOURCE_VERSION:=d554541ac6fb8ef14431fcec9a31dbcb52181279
|
PKG_SOURCE_VERSION:=cd05311b505cc5025a8559c616b55e9fb4d1857d
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
|
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
|
||||||
|
|
||||||
|
|
|
||||||
54
questd/files/usr/libexec/rpcd/router.network
Executable file
54
questd/files/usr/libexec/rpcd/router.network
Executable file
|
|
@ -0,0 +1,54 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /usr/share/libubox/jshn.sh
|
||||||
|
. /lib/functions/network.sh
|
||||||
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
list)
|
||||||
|
echo '{ "dump" : {}, "hosts" : {} }'
|
||||||
|
;;
|
||||||
|
call)
|
||||||
|
case "$2" in
|
||||||
|
dump)
|
||||||
|
dump_network() {
|
||||||
|
local cfg="$1"
|
||||||
|
local is_lan type bool proto ipaddr netmask ifname
|
||||||
|
|
||||||
|
[ "$cfg" == "loopback" ] && return
|
||||||
|
|
||||||
|
config_get_bool is_lan $cfg is_lan 0
|
||||||
|
config_get type $cfg type
|
||||||
|
config_get_bool defaultroute $cfg defaultroute 1
|
||||||
|
config_get proto $cfg proto none
|
||||||
|
config_get ipaddr $cfg ipaddr
|
||||||
|
[ -z "$ipaddr" ] && network_get_ipaddr ipaddr $cfg
|
||||||
|
config_get netmask $cfg netmask "255.255.255.255"
|
||||||
|
config_get ifname $cfg ifname
|
||||||
|
|
||||||
|
json_add_object "$cfg"
|
||||||
|
json_add_boolean is_lan $is_lan
|
||||||
|
json_add_string type "$type"
|
||||||
|
json_add_boolean defaultroute $defaultroute
|
||||||
|
json_add_string proto "$proto"
|
||||||
|
json_add_string ipaddr "$ipaddr"
|
||||||
|
json_add_string netmask "$netmask"
|
||||||
|
json_add_string ifname "$ifname"
|
||||||
|
json_select ..
|
||||||
|
}
|
||||||
|
|
||||||
|
config_load network
|
||||||
|
json_init
|
||||||
|
config_foreach dump_network interface
|
||||||
|
json_dump
|
||||||
|
;;
|
||||||
|
hosts)
|
||||||
|
ubus call topology hosts | \
|
||||||
|
sed 's/interface_type/type/g' | \
|
||||||
|
sed 's/Ethernet/ethernet/g' | \
|
||||||
|
sed 's/Wi-Fi/wifi/g'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue