mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-25 19:44:30 +08:00
Compare commits
169 Commits
cr
...
release-4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96b37bdc8e | ||
|
|
97f1fe5b4e | ||
|
|
c3304df752 | ||
|
|
4cfc1561b5 | ||
|
|
67c65e34a0 | ||
|
|
3742f46d8b | ||
|
|
6a239cbe26 | ||
|
|
15abb21724 | ||
|
|
d3e0ee8f61 | ||
|
|
f518a0e99b | ||
|
|
53f8fb4bd1 | ||
|
|
d716c6cf33 | ||
|
|
599e2571e2 | ||
|
|
2f56e18c17 | ||
|
|
b6cac117d2 | ||
|
|
988c839f07 | ||
|
|
356786fc7c | ||
|
|
fbaea1e0bd | ||
|
|
78c9324100 | ||
|
|
3e9566d524 | ||
|
|
1108eb3870 | ||
|
|
1d178c2595 | ||
|
|
a4d0901657 | ||
|
|
caa85e8e95 | ||
|
|
13453642c0 | ||
|
|
3232de2cce | ||
|
|
d38f0b3928 | ||
|
|
0f6a084dc6 | ||
|
|
ada3f19ee7 | ||
|
|
03ffddecb0 | ||
|
|
5ff63b50be | ||
|
|
5e6e53fd23 | ||
|
|
efba9ffd18 | ||
|
|
19498a8b8b | ||
|
|
93e3f244c6 | ||
|
|
583cf16c17 | ||
|
|
0ba552ccd6 | ||
|
|
83ba0ce4e2 | ||
|
|
2be1987584 | ||
|
|
fb0b485c75 | ||
|
|
fa54aa62ce | ||
|
|
ba5c622190 | ||
|
|
3508679b87 | ||
|
|
b70824f551 | ||
|
|
0a0d08e799 | ||
|
|
2f1edb86cb | ||
|
|
a483e38fc2 | ||
|
|
72c5659ff5 | ||
|
|
9837a2291d | ||
|
|
a49d19a109 | ||
|
|
40c426ca09 | ||
|
|
5f284ef085 | ||
|
|
f1bfa0ba6c | ||
|
|
35ba7ccc5f | ||
|
|
217f0688bd | ||
|
|
a60bc76a51 | ||
|
|
26dca67171 | ||
|
|
a5e8074128 | ||
|
|
1a260973a6 | ||
|
|
5a885bbe43 | ||
|
|
d0ae324c7e | ||
|
|
3eee217141 | ||
|
|
e8e585a97e | ||
|
|
3ac5877e48 | ||
|
|
c3e0749ec4 | ||
|
|
36aea45a9d | ||
|
|
0c944171db | ||
|
|
c206a94467 | ||
|
|
84c725ffc9 | ||
|
|
a88886fe01 | ||
|
|
45cdb5e693 | ||
|
|
914d5a3c95 | ||
|
|
25e1f14ac5 | ||
|
|
25e6850872 | ||
|
|
44fe86afc4 | ||
|
|
ef888ca6df | ||
|
|
158360fb0f | ||
|
|
f1ec27c981 | ||
|
|
53e76b07fc | ||
|
|
89cec74db5 | ||
|
|
bd0a60d108 | ||
|
|
feb648a8c5 | ||
|
|
dc660a7ad9 | ||
|
|
742cdbcf2d | ||
|
|
2f3551e643 | ||
|
|
29e635516d | ||
|
|
d4c6078f24 | ||
|
|
8ad83b1252 | ||
|
|
0e2154bb0d | ||
|
|
dbc9aa37c7 | ||
|
|
e0687449cc | ||
|
|
fc9a912cb5 | ||
|
|
54d5855ad9 | ||
|
|
b0054ba9c7 | ||
|
|
a5a3f56ee7 | ||
|
|
2fc025e8c5 | ||
|
|
44cf5757fc | ||
|
|
0cf9177ea3 | ||
|
|
ba6a36b6f1 | ||
|
|
ea4992c8b9 | ||
|
|
e882dd0320 | ||
|
|
0822323784 | ||
|
|
5776cee5f6 | ||
|
|
b4c01123db | ||
|
|
bcf34ec28a | ||
|
|
320a49da86 | ||
|
|
9c92e02f70 | ||
|
|
5f99b07a08 | ||
|
|
b5878cbe60 | ||
|
|
a3f87cbc04 | ||
|
|
92a770ee3e | ||
|
|
2dcb3a6360 | ||
|
|
abd919b06e | ||
|
|
08f2370477 | ||
|
|
a9415b745c | ||
|
|
01ddeaf4d7 | ||
|
|
7271ea30d6 | ||
|
|
43e6374c89 | ||
|
|
80dafc80ea | ||
|
|
85d12dec82 | ||
|
|
f3cf9cd7e1 | ||
|
|
11c81b7cc0 | ||
|
|
3a5af746ef | ||
|
|
261e890771 | ||
|
|
b6fabaaec4 | ||
|
|
c3363f01ab | ||
|
|
6051f2bed9 | ||
|
|
75fa4cd2c9 | ||
|
|
1254fec036 | ||
|
|
21f4faebee | ||
|
|
04cacf422e | ||
|
|
b051d4f1b3 | ||
|
|
668175520c | ||
|
|
947da034bb | ||
|
|
a9b3b78a13 | ||
|
|
9af1d10122 | ||
|
|
e6cd75747f | ||
|
|
13def2aa05 | ||
|
|
cb72509bae | ||
|
|
f501a209f5 | ||
|
|
685ee1e939 | ||
|
|
a90191a6ef | ||
|
|
63c53a497f | ||
|
|
1930d8bb89 | ||
|
|
94ad6902f7 | ||
|
|
829275bc4a | ||
|
|
a7a16746f5 | ||
|
|
dbfc56ac98 | ||
|
|
244f439694 | ||
|
|
a76446c04b | ||
|
|
8f7fa57b11 | ||
|
|
0c738b9916 | ||
|
|
c43bbe523d | ||
|
|
3fb53303e0 | ||
|
|
5b2a92cf14 | ||
|
|
165faa23dc | ||
|
|
6aec80f56c | ||
|
|
b175340397 | ||
|
|
7e3387355f | ||
|
|
608dfd532a | ||
|
|
1302bbc4c6 | ||
|
|
ecaff0dded | ||
|
|
2b5df064c6 | ||
|
|
1f63f66552 | ||
|
|
6f0834b9d6 | ||
|
|
b3f42cb5de | ||
|
|
019f9b00af | ||
|
|
ecb736ed74 | ||
|
|
197ff5f72c |
@@ -11,7 +11,7 @@ PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.3.0
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=637aa9ef231f81d195f7a1b67c70af445ade7fee
|
||||
PKG_SOURCE_VERSION:=5a5c94b289c79bc3a635b8d742dd9b73dcc0615f
|
||||
PKG_NAME:=dectmngr2
|
||||
|
||||
|
||||
|
||||
@@ -103,18 +103,18 @@ validate_rule_section()
|
||||
|
||||
# Clear existing rules before applying new rules
|
||||
clear_existing_rules() {
|
||||
local rule=$(iptables -t mangle -S OUTPUT|grep -m 1 MARK |sed 's/-A/-D/1')
|
||||
local rule=$(iptables -t mangle -S PREROUTING | grep -m 1 MARK |sed 's/-A/-D/1')
|
||||
while [ -n "${rule}" ]; do
|
||||
exec_log iptables -t mangle ${rule}
|
||||
rule=$(iptables -t mangle -S OUTPUT|grep -m 1 MARK |sed 's/-A/-D/1')
|
||||
rule=$(iptables -t mangle -S PREROUTING | grep -m 1 MARK |sed 's/-A/-D/1')
|
||||
done
|
||||
}
|
||||
|
||||
check_and_create() {
|
||||
iptables -t mangle -C OUTPUT ${@} 2>/dev/null
|
||||
iptables -t mangle -C PREROUTING ${@} 2>/dev/null
|
||||
# Create rule if not exists
|
||||
if [ ${?} -ne 0 ]; then
|
||||
exec_log iptables -t mangle -A OUTPUT ${@}
|
||||
exec_log iptables -t mangle -A PREROUTING ${@}
|
||||
else
|
||||
log "Rule exists for ${@}"
|
||||
fi
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=easy-soc-libs
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_VERSION:=1.0.14
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=9b7accf0ac4f7c8010fb06ba83df9e53264b429a
|
||||
PKG_SOURCE_VERSION:=76a0b60abe97499e4fe83bffd5fd698ba8b336bc
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@inteno.se>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.2
|
||||
PKG_SOURCE_VERSION:=631e61b7ab5d86f2f4c86756a117badff9fb0f2c
|
||||
PKG_SOURCE_VERSION:=ef49d57c3824df4dfb4921d39461e2bd14f918a7
|
||||
|
||||
|
||||
ifeq ($(CONFIG_ENDPT_OPEN),y)
|
||||
@@ -17,8 +17,9 @@ BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
|
||||
PKG_SOURCE:=endptmngr-$(BRCM_KERNEL_PROFILE)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
|
||||
PKG_NAME:=endptmngr-open
|
||||
PATCH_DIR:=
|
||||
else
|
||||
PKG_SOURCE_URL:=git@dev.iopsys.eu:iopsys/endptmngr
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_NAME:=endptmngr
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
#define SK9822_DEFAULT_NUM_LEDS 32 // U16, used if DT param fails
|
||||
#define SK9822_DEFAULT_BRIGHTNESS 1 // 5-bit brightness, 0-31
|
||||
#define SK9822_DEFAULT_BRIGHTNESS 15 // 5-bit brightness, 0-31
|
||||
|
||||
typedef struct {
|
||||
uint8_t b;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
config ICE_OPEN
|
||||
bool "Use pre-compiled version for Open SDK"
|
||||
default n
|
||||
1046
ice-client/Makefile
1046
ice-client/Makefile
File diff suppressed because it is too large
Load Diff
@@ -1,74 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
grep -rq "^ice:" /etc/passwd || {
|
||||
adduser -D -H -s /bin/false ice
|
||||
}
|
||||
|
||||
uci -q delete passwords.ice
|
||||
uci -q set passwords.ice=usertype
|
||||
uci -q set passwords.ice.password="\$WPAKEY"
|
||||
uci -q del_list passwords.ice._access_w=root
|
||||
uci -q add_list passwords.ice._access_w=root
|
||||
uci -q del_list passwords.ice._access_r=root
|
||||
uci -q add_list passwords.ice._access_r=root
|
||||
uci -q commit passwords
|
||||
|
||||
uci show rpcd | grep username=.*ice.* >/dev/null || {
|
||||
cat >> /etc/config/rpcd << EOF
|
||||
|
||||
config login
|
||||
option username 'ice'
|
||||
option password '\$p\$ice'
|
||||
list _access_w 'none'
|
||||
list write 'user-user'
|
||||
list write 'juci-broadcom-dsl'
|
||||
list write 'juci-broadcom-dsl-admin'
|
||||
list write 'juci-broadcom-ethernet'
|
||||
list write 'juci-broadcom-iptv'
|
||||
list write 'juci-broadcom-vlan'
|
||||
list write 'juci-broadcom-vlan-admin'
|
||||
list write 'juci-wireless'
|
||||
list write 'juci-wireless-admin'
|
||||
list write 'juci-catv'
|
||||
list write 'juci-ddns'
|
||||
list write 'juci-diagnostics'
|
||||
list write 'juci-dnsmasq-dhcp'
|
||||
list write 'juci-dropbear'
|
||||
list write 'juci-ethernet'
|
||||
list write 'juci-event'
|
||||
list write 'juci-firewall-fw3'
|
||||
list write 'juci-iconnect'
|
||||
list write 'juci-igmpinfo'
|
||||
list write 'juci-inteno-backup'
|
||||
list write 'juci-inteno-multiwan'
|
||||
list write 'juci-inteno-provisioning'
|
||||
list write 'juci-inteno-qos'
|
||||
list write 'juci-inteno-voice-client'
|
||||
list write 'juci-minidlna'
|
||||
list write 'juci-mod-status'
|
||||
list write 'juci-mod-system'
|
||||
list write 'juci-natalie-dect'
|
||||
list write 'juci-netmode'
|
||||
list write 'juci-network-netifd'
|
||||
list write 'juci-owsd'
|
||||
list write 'juci-printer'
|
||||
list write 'juci-realtime-graphs'
|
||||
list write 'juci-samba'
|
||||
list write 'juci-sfp'
|
||||
list write 'juci-snmpd'
|
||||
list write 'juci-sysupgrade'
|
||||
list write 'juci-uhttpd'
|
||||
list write 'juci-upnp'
|
||||
list write 'juci-usb'
|
||||
list write 'core'
|
||||
list write 'unauthenticated'
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
uci -q del_list dhcp.@domain[0].name="inteno.lan"
|
||||
uci -q add_list dhcp.@domain[0].name="inteno.lan"
|
||||
uci -q commit dhcp
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=4.0-2019-05-21
|
||||
PKG_VERSION:=4.0-2019-11-19
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=3ae6954f55e90a339561719a0328c0cf3a4b018c
|
||||
PKG_SOURCE_VERSION:=7491e611712afb6ebf88098a099b25ef8c2f0a8b
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
@@ -215,6 +215,7 @@ define Package/icwmp_xmpp/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmp_xmppd $(1)/etc/init.d/icwmp_xmppd
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp_xmpp $(1)/etc/config
|
||||
$(CP) ./xmpp-files/* $(1)/
|
||||
endef
|
||||
|
||||
define Package/icwmp_udpechoserver/install
|
||||
|
||||
@@ -41,4 +41,14 @@ set_cwmp_reqopts() {
|
||||
fi
|
||||
}
|
||||
|
||||
regenerate_ssl_link(){
|
||||
local cert_dir="/etc/ssl/certs"
|
||||
local all_file=$(ls $cert_dir/*.pem)
|
||||
for cfile in $all_file
|
||||
do
|
||||
ln -s $cfile $cert_dir/$(openssl x509 -hash -noout -in $cfile).0
|
||||
done
|
||||
}
|
||||
|
||||
set_cwmp_reqopts
|
||||
regenerate_ssl_link
|
||||
|
||||
21
icwmp/xmpp-files/etc/hotplug.d/iface/91-icwmp_xmpp
Normal file
21
icwmp/xmpp-files/etc/hotplug.d/iface/91-icwmp_xmpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f /etc/config/cwmp_xmpp ] || exit 0
|
||||
|
||||
[ "$ACTION" == "ifup" ] || exit 0
|
||||
[ "$INTERFACE" == "loopback" ] && exit 0
|
||||
|
||||
local defwan=$(uci -q get cwmp.cpe.default_wan_interface)
|
||||
[ -n "$defwan" -a "$(uci -q get network.$defwan)" == "interface" -a "$defwan" != "$INTERFACE" ] && exit 0
|
||||
|
||||
local islan="$(uci -q get network.$INTERFACE.is_lan)"
|
||||
[ "$islan" == "1" ] && exit 0
|
||||
|
||||
local proto="$(uci -q get network.$INTERFACE.proto)"
|
||||
[ "$proto" == "none" ] && exit 0
|
||||
|
||||
local ifname="$(uci -q get network.$INTERFACE.ifname)"
|
||||
[ "${ifname:0:1}" == "@" ] && exit 0
|
||||
|
||||
/etc/init.d/icwmp_xmppd reload &
|
||||
|
||||
@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
PKG_NAME:=ifbt
|
||||
PKG_VERSION:=0.1
|
||||
|
||||
PKG_SOURCE_VERSION:=0286812ed8036dea758f904694dc416481fba64d
|
||||
PKG_SOURCE_VERSION:=295262590c00e0e6683a51d28f6107b4678ebb8c
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ifbt.git
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ PKG_NAME:=inbd
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=665a72a6bb2b5ea5a17ad6248957fe35525b3782
|
||||
PKG_SOURCE_VERSION:=53ca7f58edb87976b5897ccaf487bb0cbbf39d07
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd
|
||||
|
||||
|
||||
@@ -188,5 +188,5 @@ CONFIG_OPENVPN_openssl_ENABLE_IPROUTE2=y
|
||||
CONFIG_KERNEL_DEVTMPFS=y
|
||||
CONFIG_KERNEL_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_BUSYBOX_CONFIG_IP is not set
|
||||
LOCAL_MIRROR="http://download.iopsys.eu/iopsys/mirror/"
|
||||
CONFIG_LOCALMIRROR="http://download.iopsys.eu/iopsys/mirror/"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
function genconfig {
|
||||
export OPENSDK=0
|
||||
export CLEAN=0
|
||||
export IMPORT=1
|
||||
export SRCTREEOVERR=0
|
||||
@@ -11,6 +12,7 @@ function genconfig {
|
||||
CUSTPATH="customerconfigs"
|
||||
export CUSTCONF="customerconfigs/customers"
|
||||
export VERBOSE=0
|
||||
#always use the mirror
|
||||
export DEVELOPER=0
|
||||
target="bogus"
|
||||
config_path=""
|
||||
@@ -23,6 +25,16 @@ function genconfig {
|
||||
Color_Off='\033[0m' # Text Reset
|
||||
Yellow='\033[0;33m' # Yellow
|
||||
|
||||
bcmAllowed=0
|
||||
iceAllowed=0
|
||||
endptAllowed=0
|
||||
natalieAllowed=0
|
||||
mediatekAllowed=0
|
||||
wifilifeAllowed=0
|
||||
defaultConsumerAllowed=0
|
||||
baseURL=""
|
||||
|
||||
|
||||
function find_last {
|
||||
egrep "^[ #]*${1}[ =]" $2 | tail -n1
|
||||
}
|
||||
@@ -81,7 +93,6 @@ function genconfig {
|
||||
set_target() {
|
||||
local profile=$1
|
||||
|
||||
|
||||
[ -e $brcm63xx_mips/genconfig ] &&
|
||||
iopsys_brcm63xx_mips=$(cd $brcm63xx_mips; ./genconfig)
|
||||
[ -e $brcm63xx_arm/genconfig ] &&
|
||||
@@ -135,24 +146,6 @@ function genconfig {
|
||||
|
||||
}
|
||||
|
||||
git remote -v | grep -q http || {
|
||||
DEVELOPER=1
|
||||
|
||||
bcmAllowed=0
|
||||
iceAllowed=0
|
||||
endptAllowed=0
|
||||
natalieAllowed=0
|
||||
mediatekAllowed=0
|
||||
wifilifeAllowed=0
|
||||
|
||||
git ls-remote git@dev.iopsys.eu:broadcom/bcmcreator.git -q 2>/dev/null && bcmAllowed=1
|
||||
git ls-remote git@dev.iopsys.eu:mediatek/linux.git -q 2>/dev/null && mediatekAllowed=1
|
||||
git ls-remote git@dev.iopsys.eu:dialog/natalie-dect-12.26.git -q 2>/dev/null && natalieAllowed=1
|
||||
git ls-remote git@dev.iopsys.eu:iopsys/endptmngr.git -q 2>/dev/null && endptAllowed=1
|
||||
git ls-remote git@dev.iopsys.eu:iopsys/wifilife.git -q 2>/dev/null && wifilifeAllowed=1
|
||||
git ls-remote git@private.inteno.se:ice-client.git -q -q 2>/dev/null && iceAllowed=1
|
||||
}
|
||||
|
||||
v() {
|
||||
[ "$VERBOSE" -ge 1 ] && echo "$@"
|
||||
}
|
||||
@@ -170,6 +163,7 @@ function genconfig {
|
||||
echo -e " -l|--list [customer]\tList all Customers or all boards for one customer"
|
||||
echo -e " -a|--list-all\t\tList all Customers and their board types"
|
||||
echo -e " -b|--boards\t\tList all board types"
|
||||
echo -e " -O|--opensdk\t\tUse the iopsysWRT opensdk"
|
||||
echo
|
||||
echo "Example ./iop genconfig dg200 TELIA"
|
||||
echo "(if no customerconfig is chosen, iopsys config will be used)"
|
||||
@@ -232,17 +226,18 @@ function genconfig {
|
||||
|
||||
setup_dirs()
|
||||
{
|
||||
if git ls-remote $CUSTREPO -q 2>/dev/null; then
|
||||
if [ ! -d "$CUSTPATH" ]; then
|
||||
git clone "$CUSTREPO" "$CUSTPATH"
|
||||
elif [ $IMPORT -eq 1 ]; then
|
||||
cd $CUSTPATH
|
||||
v "git pull"
|
||||
git pull
|
||||
cd - >/dev/null #go back
|
||||
|
||||
if [[ ! -z $CUSTREPO ]]; then
|
||||
if git ls-remote $CUSTREPO -q 2>/dev/null; then
|
||||
if [ ! -d "$CUSTPATH" ]; then
|
||||
git clone "$CUSTREPO" "$CUSTPATH"
|
||||
elif [ $IMPORT -eq 1 ]; then
|
||||
cd $CUSTPATH
|
||||
v "git pull"
|
||||
git pull
|
||||
cd - >/dev/null #go back
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "You do not have access to $CUSTREPO"
|
||||
fi
|
||||
|
||||
if [ ! -d "$FILEDIR" ]; then
|
||||
@@ -418,6 +413,7 @@ function genconfig {
|
||||
while [ -n "$1" ]; do
|
||||
case "$1" in
|
||||
|
||||
-O|--opensdk) export OPENSDK=1;;
|
||||
-c|--clean) export CLEAN=1;;
|
||||
-n|--no-update) export IMPORT=0;;
|
||||
-v|--verbose) export VERBOSE="$(($VERBOSE + 1))";;
|
||||
@@ -439,7 +435,37 @@ function genconfig {
|
||||
shift;
|
||||
done
|
||||
|
||||
CUSTREPO="${CUSTREPO:-git@dev.iopsys.eu:consumer/iopsys.git}"
|
||||
#Check if you should have public or private access
|
||||
DEVELOPER=1
|
||||
|
||||
if git remote -v | grep -q http; then
|
||||
baseURL="https://dev.iopsys.eu/"
|
||||
DEVELOPER=0
|
||||
else
|
||||
baseURL="git@dev.iopsys.eu:"
|
||||
fi
|
||||
|
||||
if [[ $OPENSDK -eq 0 ]] ; then
|
||||
git ls-remote $"${baseURL}consumer/iopsys.git" -q 2>/dev/null && defaultConsumerAllowed=1
|
||||
|
||||
git ls-remote $"${baseURL}broadcom/bcmcreator.git" -q 2>/dev/null && bcmAllowed=1
|
||||
git ls-remote $"${baseURL}mediatek/linux.git" -q 2>/dev/null && mediatekAllowed=1
|
||||
git ls-remote $"${baseURL}dialog/natalie-dect-12.26.git" -q 2>/dev/null && natalieAllowed=1
|
||||
git ls-remote $"${baseURL}iopsys/endptmngr.git" -q 2>/dev/null && endptAllowed=1
|
||||
git ls-remote $"${baseURL}iopsys/wifilife.git" -q 2>/dev/null && wifilifeAllowed=1
|
||||
git ls-remote git@private.inteno.se:ice-client.git -q -q 2>/dev/null && iceAllowed=1
|
||||
|
||||
if [[ $defaultConsumerAllowed -eq 1 ]] && [[ $baseURL == *"git@"* ]]
|
||||
then
|
||||
CUSTREPO="${CUSTREPO:-git@dev.iopsys.eu:consumer/iopsys.git}"
|
||||
elif [[ $defaultConsumerAllowed -eq 1 ]] && [[ $baseURL == *"https"* ]]
|
||||
then
|
||||
CUSTREPO="${CUSTREPO:-https://dev.iopsys.eu/consumer/iopsys.git}"
|
||||
else
|
||||
CUSTREPO="${CUSTREPO:-}"
|
||||
fi
|
||||
fi
|
||||
echo "custrepo: $CUSTREPO"
|
||||
|
||||
setup_dirs
|
||||
create_and_copy_files "$@"
|
||||
|
||||
378
iop/scripts/genconfig_min.sh
Normal file
378
iop/scripts/genconfig_min.sh
Normal file
@@ -0,0 +1,378 @@
|
||||
#!/bin/bash
|
||||
|
||||
function genconfig_min {
|
||||
export CLEAN=0
|
||||
export SRCTREEOVERR=0
|
||||
export FILEDIR="files/"
|
||||
CURRENT_CONFIG_FILE=".current_config_file"
|
||||
export CONFIGPATH="package/feeds/iopsys/iop"
|
||||
CUSTPATH="customerconfigs"
|
||||
export CUSTCONF="customerconfigs/customers"
|
||||
export VERBOSE=0
|
||||
#always use the mirror
|
||||
export DEVELOPER=0
|
||||
target="bogus"
|
||||
config_path=""
|
||||
brcm63xx_mips="target/linux/iopsys-brcm63xx-mips"
|
||||
brcm63xx_arm="target/linux/iopsys-brcm63xx-arm"
|
||||
ramips="target/linux/iopsys-ramips"
|
||||
intel_mips="target/linux/intel_mips"
|
||||
|
||||
Red='\033[0;31m' # Red
|
||||
Color_Off='\033[0m' # Text Reset
|
||||
Yellow='\033[0;33m' # Yellow
|
||||
|
||||
function find_last {
|
||||
egrep "^[ #]*${1}[ =]" $2 | tail -n1
|
||||
}
|
||||
|
||||
function is_new {
|
||||
for opt in $conf_warned
|
||||
do
|
||||
if [ "$opt" == "$1" ]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
# option not found return true
|
||||
return 0
|
||||
}
|
||||
|
||||
function verify_config {
|
||||
IFS=$'\n'
|
||||
org=$(<.genconfig.config)
|
||||
unset IFS
|
||||
local num
|
||||
local conf_opt
|
||||
local conf_org
|
||||
local conf_new
|
||||
|
||||
#echo "lines to check $tot_lines"
|
||||
num=0
|
||||
for line in $org
|
||||
do
|
||||
conf_opt=$(echo $line | grep CONFIG_ | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
|
||||
if [ -n "${conf_opt}" ]
|
||||
then
|
||||
conf_org=$(find_last ${conf_opt} .genconfig.config)
|
||||
conf_new=$(find_last ${conf_opt} .config)
|
||||
if [ "$conf_org" != "$conf_new" ]
|
||||
then
|
||||
if is_new $conf_opt
|
||||
then
|
||||
echo -e "config option [${Red}$conf_opt${Color_Off}] is not set correctly in .config"
|
||||
echo -e "got value [${Yellow}$conf_new${Color_Off}] but wanted [${Yellow}$conf_org${Color_Off}]"
|
||||
echo "This is a real problem somebody needs to investigate"
|
||||
echo ""
|
||||
conf_warned="$conf_warned $conf_opt"
|
||||
fi
|
||||
else
|
||||
true
|
||||
# for debug to see all options
|
||||
#echo -e "wanted [$conf_org] got [$conf_new]"
|
||||
fi
|
||||
fi
|
||||
num=$((num+1))
|
||||
done
|
||||
}
|
||||
|
||||
# Takes a board name and returns the target name in global var $target
|
||||
set_target() {
|
||||
local profile=$1
|
||||
|
||||
[ -e $brcm63xx_mips/genconfig ] &&
|
||||
iopsys_brcm63xx_mips=$(cd $brcm63xx_mips; ./genconfig)
|
||||
[ -e $brcm63xx_arm/genconfig ] &&
|
||||
iopsys_brcm63xx_arm=$(cd $brcm63xx_arm; ./genconfig)
|
||||
[ -e $ramips/genconfig ] &&
|
||||
iopsys_ramips=$(cd $ramips; ./genconfig)
|
||||
[ -e $intel_mips/genconfig ] &&
|
||||
iopsys_intel_mips=$(cd $intel_mips; ./genconfig)
|
||||
|
||||
if [ "$profile" == "LIST" ]; then
|
||||
for list in iopsys_brcm63xx_mips iopsys_brcm63xx_arm iopsys_ramips iopsys_intel_mips; do
|
||||
echo "$list based boards:"
|
||||
for b in ${!list}; do
|
||||
echo -e "\t$b"
|
||||
done
|
||||
done
|
||||
return
|
||||
fi
|
||||
|
||||
for p in $iopsys_brcm63xx_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_mips"
|
||||
config_path="$brcm63xx_mips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_brcm63xx_arm; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_arm"
|
||||
config_path="$brcm63xx_arm/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_ramips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_ramips"
|
||||
config_path="$ramips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_intel_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="intel_mips"
|
||||
config_path="$intel_mips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
v() {
|
||||
[ "$VERBOSE" -ge 1 ] && echo "$@"
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo
|
||||
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer [customer2 ]...]"
|
||||
echo
|
||||
echo -e " -v|--verbose\t\tVerbose"
|
||||
echo -e " -s|--override\t\tEnable 'Package source tree override'"
|
||||
echo -e " -S|--brcmsingle\tForce build of bcmkernel to use only one thread"
|
||||
echo -e " -h|--help\t\tShow this message"
|
||||
echo -e " -l|--list [customer]\tList all Customers or all boards for one customer"
|
||||
echo -e " -a|--list-all\t\tList all Customers and their board types"
|
||||
echo -e " -b|--boards\t\tList all board types"
|
||||
echo
|
||||
echo "Example ./iop genconfig dg400prime IOPSYS"
|
||||
echo
|
||||
exit 0
|
||||
}
|
||||
|
||||
list_customers()
|
||||
{
|
||||
local ALL="$1"
|
||||
local CUSTOMER="$2"
|
||||
if [ "$CUSTOMER" -a -d "$CUSTCONF/$CUSTOMER" ]; then
|
||||
local boards="$(ls -1 "$CUSTCONF/$CUSTOMER" | grep -v common )"
|
||||
if [ "$boards" ]; then
|
||||
echo "$CUSTOMER has following boards:"
|
||||
for board in $boards; do
|
||||
echo -e "\t$board"
|
||||
done
|
||||
else
|
||||
echo "No boards found for $CUSTOMER"
|
||||
fi
|
||||
elif [ "$CUSTOMER" ]; then
|
||||
echo "No customer called $CUSTOMER"
|
||||
exit 1
|
||||
elif [ -d $CUSTCONF ]; then
|
||||
local customers="$(ls -1 $CUSTCONF)"
|
||||
if [ "$customers" -a "$ALL" == 1 ]; then
|
||||
for customer in $customers; do
|
||||
echo $customer
|
||||
local boards="$(ls -1 $CUSTCONF/$customer | grep -v common )"
|
||||
if [ "$boards" ]; then
|
||||
for board in $boards; do
|
||||
echo -e "\t$board"
|
||||
done
|
||||
else
|
||||
echo "has no boards"
|
||||
fi
|
||||
done
|
||||
elif [ "$customers" ]; then
|
||||
echo -e "$customers"
|
||||
else
|
||||
echo "no customers found"
|
||||
fi
|
||||
else
|
||||
echo "No $CUSTCONF folder found"
|
||||
fi
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
generate_config()
|
||||
{
|
||||
DIFFFILE="$1"
|
||||
MASTERFILE="$2"
|
||||
while read p; do
|
||||
v "$p"
|
||||
sed -r -i "$p" $MASTERFILE
|
||||
done < $DIFFFILE
|
||||
}
|
||||
|
||||
setup_dirs()
|
||||
{
|
||||
|
||||
if [ ! -d "$FILEDIR" ]; then
|
||||
mkdir -p $FILEDIR
|
||||
elif [ -d "$FILEDIR" -a $CLEAN -eq 1 ]; then
|
||||
v "rm -rf $FILEDIR*"
|
||||
rm -rf $FILEDIR*
|
||||
fi
|
||||
}
|
||||
|
||||
create_and_copy_files()
|
||||
{
|
||||
local BOARDTYPE=$1
|
||||
shift
|
||||
local CUSTOMERS=$@
|
||||
|
||||
# Validate seleced board and customers
|
||||
set_target $BOARDTYPE
|
||||
if [ $target == "bogus" ]; then
|
||||
echo "Hardware profile does not exist"
|
||||
exit 1
|
||||
elif [ -n "$CUSTOMERS" ]; then
|
||||
for CUSTOMER in $CUSTOMERS; do
|
||||
if [ ! -d "$CUSTCONF/$CUSTOMER/" ]; then
|
||||
echo "Customer profile for '$CUSTOMER' does not exist"
|
||||
exit 1
|
||||
elif [ ! -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/" ]; then
|
||||
echo "'$BOARDTYPE' board profile does not exist for customer '$CUSTOMER'"
|
||||
if [ -f "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
|
||||
echo "Common profile configuration will be used"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Generate base config
|
||||
rm -f .config
|
||||
v "Config $BOARDTYPE selected"
|
||||
v "cp $CONFIGPATH/config .config"
|
||||
cp $CONFIGPATH/config .config
|
||||
|
||||
if [ -f $config_path/config ]; then
|
||||
cat $config_path/config >> .config
|
||||
fi
|
||||
if [ -f $config_path/$BOARDTYPE/config ]; then
|
||||
cat $config_path/$BOARDTYPE/config >> .config
|
||||
fi
|
||||
|
||||
#special handling for intel_mips which use TARGET_DEVICES
|
||||
if [ "$target" = "intel_mips" ]; then
|
||||
subtarget="xrx500"
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
|
||||
echo "CONFIG_TARGET_MULTI_PROFILE=y" >> .config
|
||||
echo "CONFIG_TARGET_PER_DEVICE_ROOTFS=y" >> .config
|
||||
device=$(echo $BOARDTYPE | tr a-z A-Z)
|
||||
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${device}=y" >> .config
|
||||
else
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
|
||||
fi
|
||||
|
||||
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE
|
||||
|
||||
# Add customerconfig diff if a customer is selected
|
||||
if [ -n "$CUSTOMERS" ]; then
|
||||
for CUSTOMER in $CUSTOMERS; do
|
||||
if [ -d "$CUSTCONF/$CUSTOMER/common/fs" ]; then
|
||||
v "cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR" CUSTREPO="${CUSTREPO:-}"
|
||||
|
||||
cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR
|
||||
fi
|
||||
if [ -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/fs" ]; then
|
||||
v "cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR"
|
||||
cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/common/common.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/common/common.diff >> .config
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff >> .config
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Set target version
|
||||
local GIT_TAG=$(git describe --abbrev=0 --tags)
|
||||
echo "CONFIG_TARGET_VERSION=\"${GIT_TAG}\"" >> .config
|
||||
|
||||
# Enable Package source tree override if selected
|
||||
[ $SRCTREEOVERR -eq 1 ] && echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
|
||||
|
||||
# developer mode selected ?
|
||||
echo "CONFIG_DEVEL=y" >>.config
|
||||
|
||||
if [ -n "$BRCM_MAX_JOBS" ]
|
||||
then
|
||||
echo "CONFIG_BRCM_MAX_JOBS=\"1\"" >>.config
|
||||
fi
|
||||
|
||||
# Force regeneration of kernel Makefile
|
||||
# Needed to disable kmods for iopsys-brcm targets
|
||||
touch package/kernel/linux/Makefile
|
||||
|
||||
# we need to signal to bradcom SDK that we have changed the board id
|
||||
# currently boardparms.c and boardparms_voice.c is the only place that is depending on inteno boardid name
|
||||
# so just touch that file.
|
||||
[ -d ./build_dir ] && find build_dir/ -name "boardparms*c" -print0 2>/dev/null | xargs -0 touch 2>/dev/null
|
||||
|
||||
# Store generated config
|
||||
cp .config .genconfig.config
|
||||
|
||||
# Set default values based on selected parameters
|
||||
v "$(make defconfig 2>&1)"
|
||||
|
||||
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
|
||||
|
||||
# Clean base-file package to force rebuild when changing profile
|
||||
v "$(make package/base-files/clean 2>&1)"
|
||||
|
||||
verify_config
|
||||
}
|
||||
|
||||
####### main #####
|
||||
if [ ! -e tmp/.iop_bootstrap ]; then
|
||||
echo "You have not installed feeds. Running genconfig in this state would create a non functional configuration."
|
||||
echo "Run: iop feeds_update"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo Current profile:
|
||||
cat $CURRENT_CONFIG_FILE
|
||||
echo "Try ./iop genconfig -h' to get instructions if you want to change current config"
|
||||
exit 0
|
||||
else
|
||||
while [ -n "$1" ]; do
|
||||
case "$1" in
|
||||
|
||||
-v|--verbose) export VERBOSE="$(($VERBOSE + 1))";;
|
||||
-p|--profile) export PROFILE="$2"; shift;;
|
||||
-r|--repo) export CUSTREPO="$2"; shift;;
|
||||
-s|--override) export SRCTREEOVERR=1;;
|
||||
-S|--brcmsingel) export BRCM_MAX_JOBS=1;;
|
||||
-h|--help) usage;;
|
||||
-l|--list) list_customers 0 $2;;
|
||||
-a|--list-all)list_customers 1;;
|
||||
-b|--boards)set_target LIST;exit 0;;
|
||||
-*)
|
||||
echo "Invalid option: $1 "
|
||||
echo "Try -h or --help for more information."
|
||||
exit 1
|
||||
;;
|
||||
*) break;;
|
||||
esac
|
||||
shift;
|
||||
done
|
||||
|
||||
setup_dirs
|
||||
create_and_copy_files "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
register_command "genconfig_min" "Generate configuration for customer with manual board configuration"
|
||||
@@ -59,30 +59,24 @@ build_endptmngr_consumer() {
|
||||
cd "$curdir"
|
||||
}
|
||||
|
||||
build_ice_consumer() {
|
||||
# create ice-client open version tar file
|
||||
local iceversion icebasever icerelease icecommith
|
||||
icecommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/iopsys/ice-client/Makefile | head -1 | cut -d'=' -f2)
|
||||
icebasever=$(grep -w "BASE_PKG_VERSION:" ./feeds/iopsys/ice-client/Makefile | cut -d'=' -f2)
|
||||
icerelease=$(grep -w "PKG_RELEASE:" ./feeds/iopsys/ice-client/Makefile | cut -d'=' -f2)
|
||||
iceversion=$icebasever$icerelease
|
||||
[ -n "$target" -a -n "$iceversion" -a -n "$icecommith" ] || return
|
||||
ssh $SERVER "test -f $FPATH/ice-client-$target-$iceversion-$icecommith.tar.gz" && return
|
||||
cd ./build_dir/target-*/ice-client-$icebasever/ipkg-* || cd ./build_dir/target-mips*musl-*/ice-client-$icebasever/ipkg-*
|
||||
tar -czv ice-client -f ice-client-$target-$iceversion-$icecommith.tar.gz
|
||||
scp -pv ice-client-$target-$iceversion-$icecommith.tar.gz $SERVER:$FPATH/
|
||||
cp ice-client-$target-$iceversion-$icecommith.tar.gz $curdir/
|
||||
rm -f ice-client-$target-$iceversion-$icecommith.tar.gz
|
||||
cd "$curdir"
|
||||
}
|
||||
|
||||
build_wifilife_consumer() {
|
||||
local target="$1"
|
||||
local ver commit
|
||||
ver=$(grep -w "PKG_VERSION:" ./feeds/iopsys/wifilife/Makefile | cut -d'=' -f2)
|
||||
commit=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/iopsys/wifilife/Makefile | cut -d'=' -f2)
|
||||
[ -n "$ver" -a -n "$commit" ] || return
|
||||
ssh $SERVER "test -f $FPATH/wifilife-$target-${ver}_${commit}.tar.xz" && return
|
||||
cd ./build_dir/target-*/wifilife-$ver/ipkg-* || cd ./build_dir/target-mips*musl-*/wifilife-$ver/ipkg-*
|
||||
if [ "$target" == "iopsys-ramips" ]; then
|
||||
cd ./build_dir/target-mipsel_1004kc_musl/wifilife-$ver/ipkg-*
|
||||
elif [ "$target" == "intel_mips" ]; then
|
||||
cd ./build_dir/target-mips_24kc+nomips16_musl/wifilife-$ver/ipkg-*
|
||||
elif [ "$target" == "iopsys-brcm63xx-arm" ]; then
|
||||
cd ./build_dir/target-arm_xscale_musl_eabi/wifilife-$ver/ipkg-*
|
||||
elif [ "$target" == "iopsys-brcm63xx-mips" ]; then
|
||||
cd ./build_dir/target-mips*/wifilife-$ver/ipkg-*
|
||||
else
|
||||
return
|
||||
fi
|
||||
mkdir -p wifilife-$ver/src
|
||||
cp -rf wifilife/usr/sbin/* wifilife-$ver/src/
|
||||
tar Jcf wifilife-${target}-${ver}_${commit}.tar.xz wifilife-$ver
|
||||
@@ -147,7 +141,7 @@ function generate_tarballs {
|
||||
while getopts "t:h" opt; do
|
||||
case $opt in
|
||||
t)
|
||||
stk_target=${OPTARG}
|
||||
sdk_target=${OPTARG}
|
||||
;;
|
||||
h)
|
||||
print_usage
|
||||
@@ -160,23 +154,23 @@ function generate_tarballs {
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -n "$stk_target" ]; then
|
||||
if [ ! -n "$sdk_target" ]; then
|
||||
print_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$stk_target" == "broadcom" ]; then
|
||||
if [ "$sdk_target" == "broadcom" ]; then
|
||||
build_bcmkernel_consumer
|
||||
build_natalie_consumer
|
||||
build_endptmngr_consumer
|
||||
build_ice_consumer
|
||||
build_wifilife_consumer
|
||||
elif [ "$stk_target" == "mediatek" ]; then
|
||||
build_wifilife_consumer "$target"
|
||||
elif [ "$sdk_target" == "mediatek" ]; then
|
||||
build_mediatek_kernel
|
||||
build_ice_consumer
|
||||
build_wifilife_consumer
|
||||
build_wifilife_consumer "$target"
|
||||
elif [ "$sdk_target" == "intel" ]; then
|
||||
build_wifilife_consumer "$target"
|
||||
else
|
||||
echo "Invalid target: $stk_target"
|
||||
echo "Invalid target: $sdk_target"
|
||||
print_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -18,7 +18,7 @@ PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
|
||||
PKG_NAME:=natalie-dect-open
|
||||
else
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=git@dev.iopsys.eu:dialog/natalie-dect-12.26
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/dialog/natalie-dect-12.26.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
endif
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=netmode
|
||||
PKG_VERSION:=0.2.0
|
||||
|
||||
PKG_SOURCE_VERSION:=9fa23664b3bdd963e4556f5921c9f9be1c9c578f
|
||||
PKG_SOURCE_VERSION:=6406325e72d7ddd0ff7aaa3a87669519021bdb11
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/netmoded
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ start_netmoded() {
|
||||
procd_open_instance
|
||||
procd_set_param command $NETMODED
|
||||
|
||||
procd_append_param command --verbose warning
|
||||
procd_append_param command --verbose warning -i macaddr
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
@@ -8,9 +7,6 @@ config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
uci -q set owsd.ubusproxy.enable="0"
|
||||
uci -q commit owsd
|
||||
@@ -1,6 +1,5 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
@@ -8,9 +7,6 @@ config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device ra0
|
||||
option band b
|
||||
option channel auto
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
@@ -8,9 +7,6 @@ config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
config proxy
|
||||
option scope global
|
||||
option uplink wan
|
||||
list downlink lan
|
||||
|
||||
config proxy
|
||||
option scope global
|
||||
option uplink wan6
|
||||
list downlink lan
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
@@ -8,9 +7,6 @@ config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device ra0
|
||||
option band b
|
||||
option channel auto
|
||||
|
||||
@@ -121,8 +121,13 @@ run_netmode_scripts() {
|
||||
local mode=$1
|
||||
local when=$2
|
||||
local script
|
||||
local path
|
||||
|
||||
path=$(readlink -f /etc/netmodes/$mode/)
|
||||
[ "${path:0:14}" == "/etc/netmodes/" ] || exit
|
||||
|
||||
if [ -d /etc/netmodes/$mode/scripts/$when ]; then
|
||||
logger -s -p user.info -t $0 "[netmode] Executing $when netmode scripts" >/dev/console
|
||||
logger -s -p user.info -t "netmode" "Executing $when netmode scripts" >/dev/console
|
||||
for script in $(ls /etc/netmodes/$mode/scripts/$when/); do
|
||||
sh /etc/netmodes/$mode/scripts/$when/$script
|
||||
done
|
||||
@@ -185,7 +190,7 @@ switch_netmode() {
|
||||
mkdir -p $CONF_BACKUP_DIR
|
||||
cp -af /etc/config/* $CONF_BACKUP_DIR
|
||||
|
||||
logger -s -p user.info -t $0 "[netmode] Copying /etc/netmodes/$curmode in /etc/config" >/dev/console
|
||||
logger -s -p user.info -t "netmode" "Copying /etc/netmodes/$curmode in /etc/config" >/dev/console
|
||||
|
||||
for file in $(ls /etc/netmodes/$curmode/); do
|
||||
case "$file" in
|
||||
@@ -210,11 +215,10 @@ switch_netmode() {
|
||||
case "$curmode" in
|
||||
repeater*)
|
||||
touch $SWITCHMODELOCK
|
||||
logger -s -p user.info -t $0 "Switching to $curmode mode" > /dev/console
|
||||
logger -s -p user.info -t "netmode" "Switching to $curmode mode" > /dev/console
|
||||
ubus call leds set '{"state" : "allflash"}'
|
||||
[ -f /etc/init.d/omcproxy ] && /etc/init.d/omcproxy stop
|
||||
[ -f /etc/init.d/igmpproxy ] && /etc/init.d/igmpproxy stop
|
||||
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
|
||||
[ -f /etc/init.d/macoffset ] && /etc/init.d/macoffset reload
|
||||
ubus call network reload
|
||||
wifi reload nodat
|
||||
ubus call router.network reload
|
||||
@@ -225,6 +229,7 @@ switch_netmode() {
|
||||
;;
|
||||
*)
|
||||
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
|
||||
[ -f /etc/init.d/macoffset ] && /etc/init.d/macoffset reload
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
;;
|
||||
esac
|
||||
@@ -238,18 +243,17 @@ revert_netmode() {
|
||||
local rready="$3"
|
||||
|
||||
ubus call leds set '{"state" : "allflash"}'
|
||||
echo "Could not switch to '$from' mode; going back to '$to' mode" > /dev/console
|
||||
logger -s -p user.info -t "netmode" "Could not switch to '$from' mode; going back to '$to' mode" > /dev/console
|
||||
cp -af $CONF_BACKUP_DIR/* /etc/config/
|
||||
sync
|
||||
uci -q set netmode.setup.curmode="$to"
|
||||
uci -q set netmode.setup.repeaterready="$rready"
|
||||
uci commit netmode
|
||||
cp -af $CONF_BACKUP_DIR/* /etc/config/
|
||||
sync
|
||||
rm -rf $CONF_BACKUP_DIR
|
||||
rm -rf $OLD_MODE_FILE
|
||||
|
||||
echo "Restarting network services" > /dev/console
|
||||
ubus call network reload
|
||||
wifi reload
|
||||
logger -s -p user.info -t "netmode" "Restarting network services" > /dev/console
|
||||
/etc/init.d/network restart
|
||||
ubus call router.network reload
|
||||
ubus call leds set '{"state" : "normal"}'
|
||||
}
|
||||
@@ -288,10 +292,10 @@ wait_for_netmode_handler() {
|
||||
|
||||
netmode_get_ip_type() {
|
||||
[ -n "$(echo $1 | grep -E '^(192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.)')" ] && {
|
||||
logger -t "[netmode]" "netmode_get_ip_type: ip $1 is private"
|
||||
logger -t $0 "netmode_get_ip_type: ip $1 is private"
|
||||
echo "private"
|
||||
} || {
|
||||
logger -t "[netmode]" "netmode_get_ip_type: ip $1 is public"
|
||||
logger -t $0 "netmode_get_ip_type: ip $1 is public"
|
||||
echo "public"
|
||||
}
|
||||
}
|
||||
@@ -379,7 +383,7 @@ populate_netmodes() {
|
||||
done
|
||||
|
||||
local hardware=$(db get hw.board.hardware)
|
||||
local keys lang desc exp exclude
|
||||
local keys lang desc exp exclude support
|
||||
for mode in $(ls $MODEDIR); do
|
||||
|
||||
case "$mode" in
|
||||
@@ -409,6 +413,23 @@ populate_netmodes() {
|
||||
done
|
||||
json_select ..
|
||||
[ $exclude -eq 1 ] && continue
|
||||
elif json_select supported_boards; then
|
||||
support=0
|
||||
_i=1
|
||||
while json_get_var board $_i; do
|
||||
case "$hardware" in
|
||||
$board)
|
||||
support=1
|
||||
break
|
||||
;;
|
||||
esac
|
||||
_i=$((_i+1))
|
||||
done
|
||||
json_select ..
|
||||
[ $support -eq 1 ] || {
|
||||
uci -q delete netmode.$mode
|
||||
continue
|
||||
}
|
||||
fi
|
||||
|
||||
if json_select acl; then
|
||||
|
||||
@@ -100,7 +100,7 @@ get_wifi_iface_cfgstr() {
|
||||
case "$1" in
|
||||
list)
|
||||
if [ $WIFISTA -eq 1 ]; then
|
||||
echo '{ "get_creds": { "network": "str", "file": "str" }, "set_creds": { "file": "str", "from_gui": "str" }, "connect": { "ssid": "str", "key": "str" }, "forget_network": {} }'
|
||||
echo '{ "get_creds": { "network": "str", "file": "str" }, "set_creds": { "file": "str", "from_gui": "str" }, "connect": { "ssid": "str", "key": "str" }, "forget_network": {}, "wps_enroll": {}, "wps_stop": {} }'
|
||||
else
|
||||
echo '{ "get_creds": { "network": "str", "file": "str" }, "set_creds": { "file": "str", "from_gui": "str" } }'
|
||||
fi
|
||||
@@ -211,6 +211,30 @@ case "$1" in
|
||||
json_add_int "code" $code
|
||||
json_dump
|
||||
;;
|
||||
wps_enroll)
|
||||
local wetif
|
||||
[ $WIFISTA -eq 1 ] && wetif="$(uci -q get wireless.$(uci show wireless | grep 'mode=.*wet.*' | cut -d'.' -f2 | head -1).ifname)"
|
||||
if [ -n "$wetif" ]; then
|
||||
iwpriv $wetif set ApCliEnable=0
|
||||
iwpriv $wetif set WscConfMode=1
|
||||
iwpriv $wetif set WscMode=2
|
||||
iwpriv $wetif set ApCliEnable=1
|
||||
iwpriv $wetif set WscGetConf=1
|
||||
fi
|
||||
json_init
|
||||
json_add_string "ifname" $wetif
|
||||
json_dump
|
||||
;;
|
||||
wps_stop)
|
||||
local wetif
|
||||
[ $WIFISTA -eq 1 ] && wetif="$(uci -q get wireless.$(uci show wireless | grep 'mode=.*wet.*' | cut -d'.' -f2 | head -1).ifname)"
|
||||
if [ -n "$wetif" ]; then
|
||||
iwpriv $wetif set WscStop=1
|
||||
fi
|
||||
json_init
|
||||
json_add_string "ifname" $wetif
|
||||
json_dump
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
52
obuspa/Makefile
Normal file
52
obuspa/Makefile
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# Copyright (C) 2019 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=obuspa
|
||||
PKG_VERSION:=1.0.0
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=014d7ec63331b3b745e8af53a4be1b52693e2a6f
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/obuspa
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=USP agent
|
||||
DEPENDS:=+libcoap +libopenssl +libcurl +libsqlite3 +libcares +libubox +libubus +libblobmsg-json +uspd
|
||||
endef
|
||||
|
||||
define Package/obuspa/description
|
||||
OB-USP-AGENT is a system daemon providing a User Services Platform (USP) Agent.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifneq ($(CONFIG_USE_MUSL),)
|
||||
TARGET_CFLAGS += -DUSE_MUSL
|
||||
endif
|
||||
|
||||
#define Build/Prepare
|
||||
# $(CP) -rf ./obuspa/* $(PKG_BUILD_DIR)/
|
||||
#endef
|
||||
|
||||
define Package/obuspa/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/obuspa $(1)/usr/sbin/
|
||||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,obuspa))
|
||||
14
obuspa/files/etc/config/obuspa
Normal file
14
obuspa/files/etc/config/obuspa
Normal file
@@ -0,0 +1,14 @@
|
||||
config controller
|
||||
option endpointid 'self::usp-controller.com'
|
||||
|
||||
config mtp
|
||||
option enable 'true'
|
||||
option protocol 'STOMP'
|
||||
option destination 'uspq'
|
||||
|
||||
config connection
|
||||
option host 'usp-controller.com'
|
||||
option username 'username'
|
||||
option password 'password'
|
||||
option encryption 'false'
|
||||
|
||||
105
obuspa/files/etc/init.d/obuspa
Executable file
105
obuspa/files/etc/init.d/obuspa
Executable file
@@ -0,0 +1,105 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
PROG=/usr/sbin/obuspa
|
||||
|
||||
CTRL_PATH="Device.LocalAgent.Controller.1."
|
||||
MTP_PATH="Device.LocalAgent.MTP.1."
|
||||
CONN_PATH="Device.STOMP.Connection.1."
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t obuspa -p debug
|
||||
}
|
||||
|
||||
db_set() {
|
||||
log "DBSET param|${1}| value|${2}|"
|
||||
${PROG} -c dbset ${1} ${2}
|
||||
}
|
||||
|
||||
validate_controller_section()
|
||||
{
|
||||
uci_validate_section obuspa controller "${1}" \
|
||||
'endpointid:string:"self:usp-controller.com"'
|
||||
}
|
||||
|
||||
validate_mtp_section()
|
||||
{
|
||||
uci_validate_section obuspa mtp "${1}" \
|
||||
'enable:bool:true' \
|
||||
'protocol:string:"STOMP"' \
|
||||
'destination:string:'
|
||||
}
|
||||
|
||||
validate_connection_section()
|
||||
{
|
||||
uci_validate_section obuspa connection "${1}" \
|
||||
'host:string:"usp-controller.com"' \
|
||||
'username:string:username' \
|
||||
'password:string:password' \
|
||||
'encryption:bool:true'
|
||||
}
|
||||
|
||||
configure_controller() {
|
||||
local endpointid
|
||||
|
||||
validate_controller_section "${1}" || {
|
||||
log "Validation of section failed"
|
||||
return 1;
|
||||
}
|
||||
db_set "${CTRL_PATH}EndpointID" ${endpointid}
|
||||
}
|
||||
|
||||
configure_mtp() {
|
||||
local protocol enable destination
|
||||
|
||||
validate_mtp_section "${1}" || {
|
||||
log "Validation of section failed"
|
||||
return 1;
|
||||
}
|
||||
db_set "${MTP_PATH}Enable" ${enable}
|
||||
db_set "${MTP_PATH}Protocol" ${protocol}
|
||||
db_set "${MTP_PATH}STOMP.Destination" ${destination}
|
||||
}
|
||||
|
||||
configure_connection() {
|
||||
local host username password encryption
|
||||
|
||||
validate_connection_section "${1}" || {
|
||||
log "Validation of section failed"
|
||||
return 1;
|
||||
}
|
||||
db_set "${CONN_PATH}Host" ${host}
|
||||
db_set "${CONN_PATH}Username" ${username}
|
||||
db_set "${CONN_PATH}Password" ${password}
|
||||
db_set "${CONN_PATH}X_ARRIS-COM_EnableEncryption" ${encryption}
|
||||
}
|
||||
|
||||
db_init() {
|
||||
[ -f /tmp/usp.db ] && rm -f /tmp/usp.db
|
||||
|
||||
config_load obuspa
|
||||
config_foreach configure_controller controller
|
||||
config_foreach configure_mtp mtp
|
||||
config_foreach configure_connection connection
|
||||
}
|
||||
start_service() {
|
||||
db_init
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
procd_append_param command -p -v 4
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_config_trigger "config.change" "obuspa" /etc/init.d/obuspa restart
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
choice
|
||||
prompt "Select Bus"
|
||||
prompt "Select IPC Bus"
|
||||
default OWSD_USE_UBUS
|
||||
depends on PACKAGE_owsd
|
||||
help
|
||||
Select which bus to compile owsd for
|
||||
Select which IPC bus to compile owsd for
|
||||
|
||||
config OWSD_USE_DBUS
|
||||
bool "Use DBUS"
|
||||
@@ -15,3 +15,11 @@ config OWSD_USE_DBUS_UBUS
|
||||
bool "Use UBUS and DBUS"
|
||||
|
||||
endchoice
|
||||
|
||||
config OWSD_UPROXYD
|
||||
bool "Enable UBUS Proxy Daemon"
|
||||
default y if OWSD_USE_UBUS || OWSD_USE_DBUS_UBUS
|
||||
help
|
||||
Enabling uproxyd automates detection of other
|
||||
UBUS-X enabled devices in the network
|
||||
|
||||
|
||||
@@ -5,25 +5,27 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=owsd
|
||||
PKG_VERSION:=1.1.1
|
||||
PKG_VERSION:=1.1.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/owsd.git
|
||||
PKG_SOURCE_VERSION:=f0eedeb6fd061edf3784d6bf86fa60b176bf3fe7
|
||||
PKG_SOURCE_VERSION:=0417231666ea7da12205c9a9798ecce7da85f881
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_OWSD_USE_DBUS CONFIG_OWSD_USE_UBUS CONFIG_OWSD_USE_DBUS_UBUS
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_OWSD_USE_DBUS CONFIG_OWSD_USE_UBUS CONFIG_OWSD_USE_DBUS_UBUS CONFIG_OWSD_UPROXYD
|
||||
|
||||
USE_UBUS-y:=-DWSD_HAVE_UBUS=ON
|
||||
USE_DBUS-y:=-DWSD_HAVE_DBUS=ON
|
||||
USE_BOTH-y:=${USE_UBUS-y} ${USE_DBUS-y}
|
||||
USE_UPROXYD-y:=-DOWSD_UPROXYD=ON
|
||||
|
||||
CMAKE_OPTIONS:=${USE_UBUS-${CONFIG_OWSD_USE_UBUS}} \
|
||||
${USE_DBUS-${CONFIG_OWSD_USE_DBUS}} \
|
||||
${USE_BOTH-${CONFIG_OWSD_USE_DBUS_UBUS}}
|
||||
${USE_BOTH-${CONFIG_OWSD_USE_DBUS_UBUS}} \
|
||||
${USE_UPROXYD-${CONFIG_OWSD_UPROXYD}}
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
@@ -51,14 +53,17 @@ endef
|
||||
define Package/owsd/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owsd $(1)/usr/bin/owsd
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uproxyd $(1)/sbin/uproxyd
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/owsd.init $(1)/etc/init.d/owsd
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./files/owsd.config $(1)/etc/config/owsd
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||
$(INSTALL_BIN) ./files/owsd.hotplug $(1)/etc/hotplug.d/iface/55-owsd
|
||||
# $(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
# $(INSTALL_BIN) ./files/owsd.uci_default $(1)/etc/uci-defaults/55-owsd-interfaces
|
||||
ifeq ($(CONFIG_OWSD_UPROXYD),y)
|
||||
$(CP) ./uproxy-files/* $(1)/
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/owsd-testdata
|
||||
|
||||
@@ -5,8 +5,8 @@ config owsd 'global'
|
||||
# option www_maxage '3600'
|
||||
|
||||
# ubusproxy is enbaled if: enable = 1 or peer exists or path exists
|
||||
config ubusproxy 'ubusproxy'
|
||||
option enable '0'
|
||||
#config ubusproxy 'ubusproxy'
|
||||
# option enable '0'
|
||||
# list peer 'wss://repeater_hostname/'
|
||||
# list peer 'wss://192.168.1.101/'
|
||||
# list object 'router.*'
|
||||
@@ -30,12 +30,12 @@ config owsd-listen 'lan'
|
||||
option whitelist_interface_as_origin '1'
|
||||
option whitelist_dhcp_domains '1'
|
||||
|
||||
config owsd-listen 'lan_8080'
|
||||
option port '8080'
|
||||
option interface 'lan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
option whitelist_dhcp_domains '1'
|
||||
#config owsd-listen 'lan_8080'
|
||||
# option port '8080'
|
||||
# option interface 'lan'
|
||||
# option ipv6 'on'
|
||||
# option whitelist_interface_as_origin '1'
|
||||
# option whitelist_dhcp_domains '1'
|
||||
|
||||
#config owsd-listen 'lan_https'
|
||||
# option port '443'
|
||||
|
||||
@@ -111,6 +111,9 @@ validate_owsd_ubusproxy() {
|
||||
'peer:list(string)' \
|
||||
'object:list(string)' \
|
||||
'prefix:string' \
|
||||
'max_reconnect_time:string' \
|
||||
'client_backoff_timeout:string' \
|
||||
'reconnect_timeout:string' \
|
||||
'peer_key:file' \
|
||||
'peer_cert:file' \
|
||||
'peer_ca:file' \
|
||||
@@ -245,6 +248,35 @@ parse_owsd_iface() {
|
||||
fi
|
||||
}
|
||||
|
||||
parser_timeout()
|
||||
{
|
||||
local flag data
|
||||
local ret=0
|
||||
#data format is digital with time unit
|
||||
#10s-10 seconds 10m-10 minutes 10h-10 hours 10d-10 days
|
||||
if [ -n "$1" ]; then
|
||||
flag=$(echo "$1"| tr -d [0-9] | tr '[A-Z]' '[a-z]')
|
||||
data=$(echo "$1"| tr -cd [0-9])
|
||||
case $flag in
|
||||
s)
|
||||
ret=$((data*1000))
|
||||
;;
|
||||
m)
|
||||
ret=$((data*1000*60))
|
||||
;;
|
||||
h)
|
||||
ret=$((data*1000*60*60))
|
||||
;;
|
||||
d)
|
||||
ret=$((data*1000*60*60*24))
|
||||
;;
|
||||
esac
|
||||
echo "$ret"
|
||||
else
|
||||
echo "0"
|
||||
fi
|
||||
}
|
||||
|
||||
start_service() {
|
||||
# update rpcd config according to owsd acl
|
||||
handle_owsd_acl
|
||||
@@ -264,48 +296,62 @@ start_service() {
|
||||
return 1
|
||||
}
|
||||
|
||||
config_get reconn ubusproxy max_reconnect_time
|
||||
config_get ctimeout ubusproxy client_backoff_timeout
|
||||
config_get rtimeout ubusproxy reconnect_timeout
|
||||
[ -n "${ctimeout}" ] && ctimeout=$(parser_timeout $ctimeout)
|
||||
[ -n "${rtimeout}" ] && rtimeout=$(parser_timeout $rtimeout)
|
||||
|
||||
[ -n "${sock}" ] && procd_append_param command -s"${sock}"
|
||||
[ -n "${www}" ] && procd_append_param command -w"${www}"
|
||||
[ -n "${redirect}" ] && procd_append_param command -r"${redirect}"
|
||||
[ -n "${www_maxage}" ] && procd_append_param command -t"${www_maxage}"
|
||||
[ -n "${rtimeout}" ] && procd_append_param command -T"${rtimeout}"
|
||||
#validate_owsd_ubusproxy || {
|
||||
# echo "Ubusproxy validation failed"
|
||||
# return 1
|
||||
#}
|
||||
|
||||
validate_owsd_ubusproxy || {
|
||||
echo "Ubusproxy validation failed"
|
||||
return 1
|
||||
validate_owsd_ubusproxy && {
|
||||
if [ "${enable}" -eq 1 ]; then
|
||||
procd_append_param command -U
|
||||
|
||||
[ -n "${peer_cert}" ] && procd_append_param command -C"${peer_cert}"
|
||||
[ -n "${peer_key}" ] && procd_append_param command -K"${peer_key}"
|
||||
[ -n "${peer_ca}" ] && procd_append_param command -A"${peer_ca}"
|
||||
|
||||
append_peer () {
|
||||
[ -n "$1" ] && procd_append_param command -P"$1"
|
||||
}
|
||||
|
||||
append_object () {
|
||||
[ -n "$1" ] && procd_append_param command -U"$1"
|
||||
}
|
||||
|
||||
config_list_foreach "ubusproxy" "peer" append_peer
|
||||
config_list_foreach "ubusproxy" "object" append_object
|
||||
|
||||
[ "${prefix}" == "mac" ] && procd_append_param command -F"mac"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "${enable}" -eq 1 ]; then
|
||||
procd_append_param command -U
|
||||
|
||||
[ -n "${peer_cert}" ] && procd_append_param command -C"${peer_cert}"
|
||||
[ -n "${peer_key}" ] && procd_append_param command -K"${peer_key}"
|
||||
[ -n "${peer_ca}" ] && procd_append_param command -A"${peer_ca}"
|
||||
|
||||
append_peer () {
|
||||
[ -n "$1" ] && procd_append_param command -P"$1"
|
||||
}
|
||||
|
||||
append_object () {
|
||||
[ -n "$1" ] && procd_append_param command -U"$1"
|
||||
}
|
||||
|
||||
config_list_foreach "ubusproxy" "peer" append_peer
|
||||
config_list_foreach "ubusproxy" "object" append_object
|
||||
|
||||
[ "${prefix}" == "mac" ] && procd_append_param command -F"mac"
|
||||
fi
|
||||
|
||||
config_foreach parse_owsd_iface "owsd-listen"
|
||||
|
||||
# procd_set_param stderr 1
|
||||
procd_set_param respawn
|
||||
|
||||
procd_close_instance
|
||||
# Start uproxyd
|
||||
procd_open_instance
|
||||
procd_set_param command $UPROXYD
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
if [ "${enable}" -eq 1 ]; then
|
||||
# Start uproxyd
|
||||
procd_open_instance
|
||||
procd_set_param command $UPROXYD
|
||||
[ -n "${reconn}" ] && procd_append_param command -r "${reconn}"
|
||||
[ -n "${ctimeout}" ] && procd_append_param command -t "${ctimeout}"
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
#stop_service()
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
MGMT_INTERFACES=""
|
||||
OWSD_INTERFACES=""
|
||||
NOT_DEFAULT=0
|
||||
|
||||
mgmt_interfaces() {
|
||||
local interface=$1
|
||||
[ "$interface" == "loopback" ] && return
|
||||
[ "$interface" == "lan" ] && return
|
||||
[ "$interface" == "wan" ] && return
|
||||
[ "$interface" == "wan6" ] && return
|
||||
|
||||
local type proto
|
||||
config_get type $interface type
|
||||
config_get proto $interface proto "none"
|
||||
[ "$type" == "bridge" -a "$proto" == "none" ] && return
|
||||
|
||||
local is_lan
|
||||
config_get is_lan $interface is_lan
|
||||
[ "$is_lan" == "1" ] && return
|
||||
|
||||
local ifname
|
||||
config_get ifname $interface ifname
|
||||
[ "${ifname:0:1}" == "@" ] && return
|
||||
|
||||
MGMT_INTERFACES="$MGMT_INTERFACES $interface"
|
||||
}
|
||||
|
||||
owsd_interfaces() {
|
||||
local config=$1
|
||||
local interface
|
||||
config_get interface $config interface
|
||||
[ "$interface" == "loopback" ] && return
|
||||
[ "$interface" == "lan" ] && return
|
||||
[ "$interface" == "wan" ] && return
|
||||
[ "$interface" == "wan6" ] && return
|
||||
|
||||
OWSD_INTERFACES="$OWSD_INTERFACES $interface"
|
||||
|
||||
NOT_DEFAULT=1
|
||||
}
|
||||
|
||||
not_owsd() {
|
||||
local interface=$1
|
||||
local there=0
|
||||
for owsd in $OWSD_INTERFACES; do
|
||||
if [ "$interface" == "$owsd" ]; then
|
||||
there=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
return $there
|
||||
}
|
||||
|
||||
config_load network
|
||||
config_foreach mgmt_interfaces interface
|
||||
|
||||
config_load owsd
|
||||
config_foreach owsd_interfaces owsd-listen
|
||||
|
||||
if [ $NOT_DEFAULT -eq 0 ]; then
|
||||
for mgmt in $MGMT_INTERFACES; do
|
||||
if $(not_owsd $mgmt); then
|
||||
uci -q set owsd.$mgmt=owsd-listen
|
||||
uci -q set owsd.$mgmt.port=80
|
||||
uci -q set owsd.$mgmt.interface="$mgmt"
|
||||
uci -q set owsd.$mgmt.ipv6="on"
|
||||
uci -q set owsd.$mgmt.whitelist_interface_as_origin="1"
|
||||
uci -q set owsd.$mgmt.origin="*"
|
||||
|
||||
uci -q set owsd.$mgmt"_8080"=owsd-listen
|
||||
uci -q set owsd.$mgmt"_8080".port=8080
|
||||
uci -q set owsd.$mgmt"_8080".interface="$mgmt"
|
||||
uci -q set owsd.$mgmt"_8080".ipv6="on"
|
||||
uci -q set owsd.$mgmt"_8080".whitelist_interface_as_origin="1"
|
||||
uci -q set owsd.$mgmt"_8080".origin="*"
|
||||
|
||||
uci commit owsd
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
19
owsd/uproxy-files/etc/ubusx/ubusxDemoCA.crt
Normal file
19
owsd/uproxy-files/etc/ubusx/ubusxDemoCA.crt
Normal file
@@ -0,0 +1,19 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDHzCCAgegAwIBAgIJAKmrHnhgM9CZMA0GCSqGSIb3DQEBCwUAMCYxJDAiBgNV
|
||||
BAMMG3Jvb3QgQ0EgZm9yIGlvcHN5cyBnYXRld2F5czAeFw0xOTA0MjcxMDQ4MTJa
|
||||
Fw0yNzA3MTQxMDQ4MTJaMCYxJDAiBgNVBAMMG3Jvb3QgQ0EgZm9yIGlvcHN5cyBn
|
||||
YXRld2F5czCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM7i0RqyVvpl
|
||||
WVm4ioXV7H/5oII6nmlGb+eQM4p0QBujhyvwtT6z0L0KXwwWRGFdYBNChBfsi9zm
|
||||
AAhgQaR5D/QPRGDIiB69O3iBd2JFqzxo1rkN/nUMbZ2OplXRscmOs34yT68hV0ov
|
||||
nv0iAr06bzyoa2sxOfN262Ic2tKYG5UYtRVnbaX40U80DYm1tvoeJfZgTiZmeuky
|
||||
7t6PrWhJ+tfKdzK+IGDsIQ3k4k+3AfS8dwDEBbGocFhx+sOG/yv5OhGlZ3dH9toz
|
||||
Gq+xrkawoa0hkKKVOFhNINdHcPG0UH7iET779nsgylT/8OGkQG3vLSBkVJ8rAaAh
|
||||
j9vKBWdxIG0CAwEAAaNQME4wHQYDVR0OBBYEFMsfty2iwKt5U+WLdsYpgYVX1ZX2
|
||||
MB8GA1UdIwQYMBaAFMsfty2iwKt5U+WLdsYpgYVX1ZX2MAwGA1UdEwQFMAMBAf8w
|
||||
DQYJKoZIhvcNAQELBQADggEBALv1l6C94e6Xos4DkiIDToLQasO0nQLcq3eZhsa6
|
||||
XJgWnBcoe7p4iLXzHzutacwTj/mx+ptbLkyqPzvIsufKeQf3hat5ICtCLZOpOW55
|
||||
fPc4GY4TMixEJDzt3L5U89BXVFTSh7aY5KbphD9zQgYcy1IpkEEPtSOL8B8KWdHb
|
||||
lrW1AE9p7YLHb4YgtS6NjEN04a1wHug/flcfes4u9DOnmJzSih9p8UtQP86hjiPK
|
||||
C9znwLrbbrJANz4D6QSTtTT+qi8iQo68sKXYLyUC10Kp19pq1FMnfY1IkCcBDSip
|
||||
hbGdxwd4txkrl52YZyuo14mXRGP/c2lvEO0a1P6IpR2kMj4=
|
||||
-----END CERTIFICATE-----
|
||||
27
owsd/uproxy-files/etc/ubusx/ubusxDemoCA.key
Normal file
27
owsd/uproxy-files/etc/ubusx/ubusxDemoCA.key
Normal file
@@ -0,0 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpAIBAAKCAQEAzuLRGrJW+mVZWbiKhdXsf/mggjqeaUZv55AzinRAG6OHK/C1
|
||||
PrPQvQpfDBZEYV1gE0KEF+yL3OYACGBBpHkP9A9EYMiIHr07eIF3YkWrPGjWuQ3+
|
||||
dQxtnY6mVdGxyY6zfjJPryFXSi+e/SICvTpvPKhrazE583brYhza0pgblRi1FWdt
|
||||
pfjRTzQNibW2+h4l9mBOJmZ66TLu3o+taEn618p3Mr4gYOwhDeTiT7cB9Lx3AMQF
|
||||
sahwWHH6w4b/K/k6EaVnd0f22jMar7GuRrChrSGQopU4WE0g10dw8bRQfuIRPvv2
|
||||
eyDKVP/w4aRAbe8tIGRUnysBoCGP28oFZ3EgbQIDAQABAoIBACYwBcr4ukdT589A
|
||||
2gjkONhSeocvTMg/4S4MFwdqd97iK3Q35SyiwlfyjyLLBWo3cyF6+Kj118c5iS4C
|
||||
nns+gWxaWRPIUB/kbBLNSv0PwRDQhTn5VEvEtIMNrrROlZOPzJ/xp3W7IMKn0aAF
|
||||
5B2LqLa4m8NYfcrr23zruJSA0S6O4O9+E2ilI0bLwMPmSEbrRhDYvOUUTP5bqWAy
|
||||
DUcOZQp26LIbx9B1gBA9XcQADjSR59ZY0vUCh6Rhd9qmJ2ZVAj78hv7yLkGOUOwS
|
||||
O9LnvBQjb7AZ9YNntTx/YlNLtbEMLfhv1/tpBZ8jVa9ZvCNBWNmrzpSCIEzhcQUY
|
||||
jv+WGyECgYEA718+bHissVTet0kcuC18XCbdg7LelOws9aSo0ZgQaRCr7BjTXNMi
|
||||
NrQPira0QmGyWtQ5eoxLw0s44b8ol0I+zwqA9q5bRMvdNUaZxE01ObC0aaZx0Sex
|
||||
51exHN7knVyWS94kMGBYQRQW5ElrmOTUUFN9WOVwsIuhx22hUd8XZ4UCgYEA3UHf
|
||||
jWzbdWlOw8ZB7hOu6MS46IFuKdztblHu3n+qw65x9i6VHy5yL8+dDOiFa8earpyP
|
||||
bPNuDr0URTj6Xu4OzQ04gLXE3SXghSKZPSOq9UoJ56fw6wXq2Dtz5rFGD4Mt+WHR
|
||||
/NiWccKSkA+x0bu8ab2hYBIAeURfqSQfAcmiRckCgYEAmTElLBpWuu6L0lTyElTZ
|
||||
38fnwB87H6e+Zj7I48ojxnmq7WA99IwSu1ulDqs61bjcghCL8IfU/NkpQCAshBEb
|
||||
TTl1q2mOc4rcuPnD8sNOqusRqwOgl7CFxH50lPt459SXQ1qZYnRmRs/qjpMGT0Uz
|
||||
M20bLUc5RWM3WAArW9AglFkCgYAdk+XHqSq5SmeeIk3D/tueAFZbtpm8fO08lzVg
|
||||
hx6T5CkV6OpEbdgT7iQnipnza46RExrVTMGEtOAV1OUbdaWC4eaQxjvX+G1IPvTP
|
||||
SIpdGhWy4y+Aq5zWZTQ8PayI/FdUBDCnJWkPMhyXp5F04Szx0cjV5/IqQ+qp2MtQ
|
||||
WN0ZiQKBgQDT7UFw5svbtjzE6pcjImRSDI4BwmA8F6C7bkK3M5mu10k+/kr5jDGG
|
||||
xgByyY61TY3TpHKLOmuxqKb3nOy8umPlFt3P7xpYTuV5+dZRrbIFKtDy2uKkYi9E
|
||||
N5xyVfanlXhlU7JoJtc2Xtkdjr5SwESHjNSjR8jDG/sd7opjeltOZg==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
1
owsd/uproxy-files/etc/ubusx/ubusxDemoCA.srl
Normal file
1
owsd/uproxy-files/etc/ubusx/ubusxDemoCA.srl
Normal file
@@ -0,0 +1 @@
|
||||
514CD4028F0A688DAD8236D20F352623455A4D74
|
||||
18
owsd/uproxy-files/etc/ubusx/ubusx_demo_only.crt
Normal file
18
owsd/uproxy-files/etc/ubusx/ubusx_demo_only.crt
Normal file
@@ -0,0 +1,18 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC+zCCAeMCFFFM1AKPCmiNrYI20g81JiNFWk10MA0GCSqGSIb3DQEBCwUAMCYx
|
||||
JDAiBgNVBAMMG3Jvb3QgQ0EgZm9yIGlvcHN5cyBnYXRld2F5czAeFw0xOTA2MjQx
|
||||
NzEwMjhaFw0yOTA2MjExNzEwMjhaME4xCzAJBgNVBAYTAlNFMRIwEAYDVQQIDAlT
|
||||
dG9ja2hvbG0xFTATBgNVBAoMDGlvcHN5cywgSW5jLjEUMBIGA1UEAwwLVUJVUy1Y
|
||||
IERlbW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDosnAz7cNKUCWZ
|
||||
9+qFs8PpV1J1o+Eq6Hv3Bc5ceNrPxcEsE2vDWQdl7QXU9Je++xILSxfvljHIUO7D
|
||||
8AOcH03NO3N0F1H4KhmYIRjTKogQL8y/YIGFkzL4bZXwXRtvzXxMYNtdX4Lbdiyc
|
||||
AtGTiSWJ3zBtShPGPFqgR4JpYmf3VaVy/f74tRdUL86rnVNaU5OIBMHGLLxwMf2Z
|
||||
w3MPKSNj1ATcNoegKvMvHpd7FE2o5lDgFkUV3b8QqcAFTrmLXx6mYYpo9Fo1KHrA
|
||||
6SiUP0KQ/lkQ28yfkvzmN4JpJtLpomzscn9nmJfbI5g3GezSGGFHDAyW/Y2c+VPN
|
||||
N9C9n/NhAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFEBujnBMhFVqLUPnDM41Cd0
|
||||
ZzbY5n/haBN885xQP0tNdCJ9qN0L8dr8bDe1IR02WHZ4UIXzvOj20Nu2+AFP1OCG
|
||||
CEEPLTQwlaJhaBzhnfLaxb7XCHqVodKBiYDYLQLFNdY9wYOKvyNI5xXMtPbH5fUK
|
||||
GJA4bZTbL5c4iaqtdXwLE/6a9FCtfGsv9k70tPw+KYR4tcA2t3SS2Oe/bGRrj5yQ
|
||||
Tjy0P7R033S4GlrsCRa7sRGg8yd7TgNpGsgyncsFRLHDG4V71I9NhOkoHR64oUfT
|
||||
YVPt/16TIi31vF5FJO4TJtbA2wEpUWPk7x2VjIOvvauMoYE6Hf3YLatzdaIQNHo=
|
||||
-----END CERTIFICATE-----
|
||||
16
owsd/uproxy-files/etc/ubusx/ubusx_demo_only.csr
Normal file
16
owsd/uproxy-files/etc/ubusx/ubusx_demo_only.csr
Normal file
@@ -0,0 +1,16 @@
|
||||
-----BEGIN CERTIFICATE REQUEST-----
|
||||
MIICkzCCAXsCAQAwTjELMAkGA1UEBhMCU0UxEjAQBgNVBAgMCVN0b2NraG9sbTEV
|
||||
MBMGA1UECgwMaW9wc3lzLCBJbmMuMRQwEgYDVQQDDAtVQlVTLVggRGVtbzCCASIw
|
||||
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOiycDPtw0pQJZn36oWzw+lXUnWj
|
||||
4Sroe/cFzlx42s/FwSwTa8NZB2XtBdT0l777EgtLF++WMchQ7sPwA5wfTc07c3QX
|
||||
UfgqGZghGNMqiBAvzL9ggYWTMvhtlfBdG2/NfExg211fgtt2LJwC0ZOJJYnfMG1K
|
||||
E8Y8WqBHgmliZ/dVpXL9/vi1F1QvzqudU1pTk4gEwcYsvHAx/ZnDcw8pI2PUBNw2
|
||||
h6Aq8y8el3sUTajmUOAWRRXdvxCpwAVOuYtfHqZhimj0WjUoesDpKJQ/QpD+WRDb
|
||||
zJ+S/OY3gmkm0umibOxyf2eYl9sjmDcZ7NIYYUcMDJb9jZz5U8030L2f82ECAwEA
|
||||
AaAAMA0GCSqGSIb3DQEBCwUAA4IBAQDWLgiuSq41EX4J5v5RH2gE3Ywr1FdzPMMe
|
||||
SCJxYL3JOcIvDl0aNyx2bAd9Gc6Zj8uRXT8gDsB3cEgAoHdGjiZB0uoNV/Auz6kS
|
||||
mYNnmpcZfAw775cBQpYBZvg2CRFqsv8mD4/OhBmoRjMpoosLkAYPuRmE58U/Ah+6
|
||||
9MJIzVca6dn7iLMLVWndkCoD9OUwBZNHU+SGTkn0IKUGyMUTmduADPBGbB7mYg6j
|
||||
DQsHiR1v7/ngb3uaQoVS8QA+XYmTUa1UZ+/83cmzjvf17rG10KwrJZh0lQNVUt5d
|
||||
gvH8aUvQq92xcXYQlhLfVFkqxmrLZNR0rIEeUVwYvVawPK8ZR+UK
|
||||
-----END CERTIFICATE REQUEST-----
|
||||
27
owsd/uproxy-files/etc/ubusx/ubusx_demo_only.key
Normal file
27
owsd/uproxy-files/etc/ubusx/ubusx_demo_only.key
Normal file
@@ -0,0 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpQIBAAKCAQEA6LJwM+3DSlAlmffqhbPD6VdSdaPhKuh79wXOXHjaz8XBLBNr
|
||||
w1kHZe0F1PSXvvsSC0sX75YxyFDuw/ADnB9NzTtzdBdR+CoZmCEY0yqIEC/Mv2CB
|
||||
hZMy+G2V8F0bb818TGDbXV+C23YsnALRk4klid8wbUoTxjxaoEeCaWJn91Wlcv3+
|
||||
+LUXVC/Oq51TWlOTiATBxiy8cDH9mcNzDykjY9QE3DaHoCrzLx6XexRNqOZQ4BZF
|
||||
Fd2/EKnABU65i18epmGKaPRaNSh6wOkolD9CkP5ZENvMn5L85jeCaSbS6aJs7HJ/
|
||||
Z5iX2yOYNxns0hhhRwwMlv2NnPlTzTfQvZ/zYQIDAQABAoIBAQC+o9IA+T4R1++2
|
||||
YMImn8xVk1DfSE/lE2rcSklywSCjMGS+c3rKJFpHSxSID4tyz8dMsUz+4JIQhx3W
|
||||
MQEEGzFmftprtd9V7UfittrbxfCLMl4QPERg5uPPXBiHQACGbFb1TDTsHp/apMqP
|
||||
Vk/VC3tRpSTLpPDma/PjdDKHnDOJEXXvIiI6lWzDjkFS8cmb+ZChAVJSAVDpM3v5
|
||||
OjtH6Cfn7QnlQh5v6OEcScmdHjGKaVstoQnulr9fK632KsWd4DVrPjcs6IYz+AmI
|
||||
w6iMVWwfXM4HmtBZKmFZDB+QedvkKj3GoIGW7rbUWWWW5Nvk549SbrV4dFLmGjFe
|
||||
Vg2X59yxAoGBAPfOj/f7aJcltV6Guf4jmt0r9fB+wHAl9Vx1Dg0Etg10LJnjbgEI
|
||||
2jkvVr4qp71GUg0vTdbAwcX5ha1gjvvLEfH2ikSut7je1L26Lcm7tcyCGnlIIOU5
|
||||
gwyLwTFArdmK8yn2gC56I+MOdiqsw3xgvGeLaM39BTdAcDYtnJ2E0ysLAoGBAPBj
|
||||
/G30UVQ3bXcPuP2vZHNUSVBRr3Rsi4YO4Ue+pF4y1tcxaEDHYR+WuD03l/Vnu9mK
|
||||
xZxHLwQuVjAeogwrzNgbN3CMN9jytGfnwPPG8YOw0umpS7wk4ZBA6wh97R6H8hlI
|
||||
6rSZYt2i92rBKEDU0i5ciUnR0pjyy/IUhM9o/L7DAoGBAJqKWKCXSl/QpW5g6QdD
|
||||
3yWFb+hes9Z85aqWWX/m6z4ysEn8WrMMeUNmcVtBMMDKZQtR7+I47d9wQFyitijz
|
||||
OKrETPCOYYdKeDQmMr33cWYr0STHxbQOjNq7IW18366miAUodEIH6++DKlBs07Dy
|
||||
hyyv9VlZLPKLHi+7fEuD9UmHAoGBAL/2OCfdx+xGbsV66rC6FK78Cad383I3E5uz
|
||||
2jYeiMcoNeOV8rh3/pjpFKrd8Bzp/1oStQa82VCvZ+f5LlIlz+hqo3Teo+I8vc+T
|
||||
g8OnhEkzNNmedXoCwZUeIhGf7XBKAwwp7DLXodl3P7giEvDiggy/nGo0gcXdbPsd
|
||||
Y4j1P49dAoGAPlVSKQx+s7zfcUwJMG9AqOXvXUEg9+AJZBn/xqVVwbd0jb/yf1lB
|
||||
7Y+3Q3FndrVF/Gd7kTbgIlwI6sk7l0+CN1jjN1WEHgFenz6O4nlwIcdbQRovw/4S
|
||||
okAV3yLGjubMCjyKdBP8bpocBcstYdr2PEmrt37XFNhQVL3C8HjdPmU=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
29
owsd/uproxy-files/etc/uci-defaults/60-owsd-ubusproxy
Normal file
29
owsd/uproxy-files/etc/uci-defaults/60-owsd-ubusproxy
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
# do not create ubusproxy section if it exists already
|
||||
[ "$(uci -q get owsd.ubusproxy)" == "ubusproxy" ] && exit 0
|
||||
|
||||
uci set owsd.ubusproxy="ubusproxy"
|
||||
uci set owsd.ubusproxy.enable="1"
|
||||
uci set owsd.ubusproxy.peer_key="/etc/ubusx/ubusx_demo_only.key"
|
||||
uci set owsd.ubusproxy.peer_cert="/etc/ubusx/ubusx_demo_only.crt"
|
||||
uci set owsd.ubusproxy.peer_ca="/etc/ubusx/ubusxDemoCA.crt"
|
||||
uci commit owsd
|
||||
|
||||
# do not create wan_https section if it exists already
|
||||
[ "$(uci -q get owsd.wan_https)" == "owsd-listen" ] && exit 0
|
||||
|
||||
# do not create wan_https section if wan interface doesn't exist
|
||||
[ "$(uci -q get network.wan)" == "interface" ] || exit 0
|
||||
|
||||
uci set owsd.wan_https="owsd-listen"
|
||||
uci set owsd.wan_https.port="443"
|
||||
uci set owsd.wan_https.interface="wan"
|
||||
uci set owsd.wan_https.key="/etc/ubusx/ubusx_demo_only.key"
|
||||
uci set owsd.wan_https.cert="/etc/ubusx/ubusx_demo_only.crt"
|
||||
uci set owsd.wan_https.ca="/etc/ubusx/ubusxDemoCA.crt"
|
||||
uci set owsd.wan_https.whitelist_interface_as_origin="1"
|
||||
uci del_list owsd.wan_https.origin="*"
|
||||
uci add_list owsd.wan_https.origin="*"
|
||||
uci commit owsd
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=19
|
||||
START=12
|
||||
STOP=91
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
@@ -56,7 +56,7 @@ configure_ethports(){
|
||||
config_get speed $name speed
|
||||
config_get ifname $name ifname
|
||||
config_get pause $name pause
|
||||
set_port_speed $ifname $speed
|
||||
set_port_speed $ifname $speed $name
|
||||
set_port_pause $ifname $pause
|
||||
}
|
||||
|
||||
@@ -73,3 +73,8 @@ service_triggers() {
|
||||
procd_add_reload_trigger ports
|
||||
}
|
||||
|
||||
boot() {
|
||||
wan=$(db -q get hw.board.ethernetWanPort)
|
||||
restart_port $wan
|
||||
start
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=questd
|
||||
PKG_VERSION:=4.1.0
|
||||
PKG_VERSION:=4.1.1
|
||||
|
||||
PKG_SOURCE_VERSION:=f354a1a9976c16bca2fb7d6cb61783ebdc650840
|
||||
PKG_SOURCE_VERSION:=68ccbdd0c689b26d3ded3569f6eed9ff785320df
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
|
||||
|
||||
@@ -44,7 +44,18 @@ export QUESTD_CFLAGS
|
||||
|
||||
define Package/questd
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libuci +libubox +ubus +libpthread +TARGET_iopsys_ramips:swconfig +TARGET_iopsys_ramips:libnl-tiny +libopenssl
|
||||
DEPENDS:=+libuci \
|
||||
+libubox \
|
||||
+ubus \
|
||||
+libpthread \
|
||||
+TARGET_iopsys_ramips:swconfig \
|
||||
+TARGET_iopsys_ramips:libnl-tiny \
|
||||
+TARGET_iopsys_ramips:ip-full \
|
||||
+TARGET_intel_mips:ip-full \
|
||||
+libopenssl \
|
||||
+easy-soc-libs \
|
||||
+libmnl \
|
||||
+libnetfilter-conntrack
|
||||
TITLE:=router info daemon
|
||||
endef
|
||||
|
||||
@@ -59,7 +70,6 @@ define Package/questd/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/questd $(1)/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wificontrol $(1)/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/graphd $(1)/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uproxyd $(1)/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/netcheck $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
12
questd/files/etc/uci-defaults/996-questd-opreqs
Normal file
12
questd/files/etc/uci-defaults/996-questd-opreqs
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
add_required_ubusproxy_objects() {
|
||||
uci -q del_list owsd.ubusproxy.object="wifix"
|
||||
uci -q add_list owsd.ubusproxy.object="wifix"
|
||||
uci commit owsd
|
||||
}
|
||||
|
||||
add_required_ubusproxy_objects
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Start the rulengd
|
||||
#
|
||||
|
||||
START=99
|
||||
STOP=01
|
||||
START=17
|
||||
STOP=11
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=rulengd
|
||||
|
||||
@@ -13,11 +13,11 @@ PKG_VERSION:=2016.08
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
ifdef CONFIG_TARGET_intel_mips
|
||||
PKG_SOURCE_URL:=git@dev.iopsys.eu:intel/uboot.git
|
||||
PKG_SOURCE_VERSION:=c77089efc41ea3292125330221bd5016796631b9
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/intel/uboot.git
|
||||
PKG_SOURCE_VERSION:=819227ec4cf4f2f8f7e8d46a3bee58e329089de6
|
||||
else
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/uboot.git
|
||||
PKG_SOURCE_VERSION:=3ef2ba866a99205496e0ce01935c89a1778d9b85
|
||||
PKG_SOURCE_VERSION:=670ad7a30f3c6871b6c8a972e19ca2dd78ea8c9b
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
@@ -46,7 +46,7 @@ UBOOT_IMG:=uboot.img
|
||||
define uboot/ex400
|
||||
TITLE:=U-Boot for the ex400
|
||||
DEPENDS:=@TARGET_iopsys_ramips
|
||||
PKG_RELEASE:=6
|
||||
PKG_RELEASE:=7
|
||||
endef
|
||||
|
||||
define uboot/sdx810_ap
|
||||
@@ -74,7 +74,7 @@ define uboot/grx500_norrland
|
||||
TITLE:=U-Boot for Norrland Board
|
||||
UBOOT_IMG:=u-boot-nand.bin
|
||||
DEPENDS:=@TARGET_intel_mips
|
||||
PKG_RELEASE:=14
|
||||
PKG_RELEASE:=15
|
||||
endef
|
||||
|
||||
UBOOTS := \
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uspd
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_VERSION:=1.0.3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=e8ee6a35751e661dd621b8b5c4cb788fe2081f58
|
||||
PKG_SOURCE_VERSION:=f033acb40afd9b087587d3cfba292e1d884600d6
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/uspd.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
@@ -38,7 +38,9 @@ TARGET_CFLAGS += \
|
||||
|
||||
define Package/uspd/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_BIN) ./files/uspd.init $(1)/etc/init.d/uspd
|
||||
$(INSTALL_CONF) ./files/uspd.config $(1)/etc/config/uspd
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uspd $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
2
uspd/files/uspd.config
Normal file
2
uspd/files/uspd.config
Normal file
@@ -0,0 +1,2 @@
|
||||
config uspd 'usp'
|
||||
option granularitylevel '0'
|
||||
@@ -17,3 +17,9 @@ reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "cwmp"
|
||||
procd_add_config_trigger "config.change" "uspd" /etc/init.d/uspd restart
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ ifeq ($(CONFIG_TARGET_intel_mips),y)
|
||||
-e 's/brcm/tapi/g' \
|
||||
-e 's/BRCM/TAPI/g' \
|
||||
-e 's/broadcom/intel/g' \
|
||||
-e 's/SWE/ETS/g' \
|
||||
$(1)/etc/config/voice_client \
|
||||
$(1)/etc/asterisk_templates/*
|
||||
sed -i \
|
||||
|
||||
@@ -64,3 +64,10 @@ featureaccesscodes = |FAC|
|
||||
;
|
||||
;language=
|
||||
|
||||
; Whether the transferor puts the transfer target on-hold before sending REFER
|
||||
;
|
||||
; The transferor needs put the transfer target on-hold before sending REFER to the transferee as per RFC5589.
|
||||
; But call transfer fails on some devices, e.g. Ericsson MTAS as the transfer target. The configuration is
|
||||
; to solve this kind of interoperability issue.
|
||||
hold_target_before_refer = |HOLDTARGET|
|
||||
|
||||
|
||||
@@ -1,138 +1,138 @@
|
||||
config 'tel_line' 'brcm0'
|
||||
option 'extension' '0000'
|
||||
option 'sip_account' 'sip0'
|
||||
option 'noise' '0'
|
||||
option 'vad' '0'
|
||||
option 'txgain' 4
|
||||
option 'rxgain' 4
|
||||
option 'echo_cancel' 1
|
||||
option 'callwaiting' '0'
|
||||
option 'clir' '0'
|
||||
config tel_line 'brcm0'
|
||||
option extension '0000'
|
||||
option noise '0'
|
||||
option vad '0'
|
||||
option txgain 4
|
||||
option rxgain 4
|
||||
option echo_cancel 1
|
||||
option callwaiting '0'
|
||||
option clir '0'
|
||||
option sip_account 'sip0'
|
||||
|
||||
config 'tel_line' 'brcm1'
|
||||
option 'extension' '1111'
|
||||
option 'sip_account' 'sip0'
|
||||
option 'noise' '0'
|
||||
option 'vad' '0'
|
||||
option 'txgain' 4
|
||||
option 'rxgain' 4
|
||||
option 'echo_cancel' 1
|
||||
option 'callwaiting' '0'
|
||||
option 'clir' '0'
|
||||
config tel_line 'brcm1'
|
||||
option extension '1111'
|
||||
option noise '0'
|
||||
option vad '0'
|
||||
option txgain 4
|
||||
option rxgain 4
|
||||
option echo_cancel 1
|
||||
option callwaiting '0'
|
||||
option clir '0'
|
||||
option sip_account 'sip0'
|
||||
|
||||
config 'tel_line' 'brcm2'
|
||||
option 'extension' '2222'
|
||||
option 'sip_account' 'sip0'
|
||||
option 'noise' '0'
|
||||
option 'vad' '0'
|
||||
option 'txgain' 4
|
||||
option 'rxgain' 4
|
||||
option 'echo_cancel' 1
|
||||
option 'callwaiting' '0'
|
||||
option 'clir' '0'
|
||||
config tel_line 'brcm2'
|
||||
option extension '2222'
|
||||
option sip_account 'sip0'
|
||||
option noise '0'
|
||||
option vad '0'
|
||||
option txgain 4
|
||||
option rxgain 4
|
||||
option echo_cancel 1
|
||||
option callwaiting '0'
|
||||
option clir '0'
|
||||
|
||||
config 'tel_line' 'brcm3'
|
||||
option 'extension' '3333'
|
||||
option 'sip_account' 'sip0'
|
||||
option 'noise' '0'
|
||||
option 'vad' '0'
|
||||
option 'txgain' 4
|
||||
option 'rxgain' 4
|
||||
option 'echo_cancel' 1
|
||||
option 'callwaiting' '0'
|
||||
option 'clir' '0'
|
||||
config tel_line 'brcm3'
|
||||
option extension '3333'
|
||||
option sip_account 'sip0'
|
||||
option noise '0'
|
||||
option vad '0'
|
||||
option txgain 4
|
||||
option rxgain 4
|
||||
option echo_cancel 1
|
||||
option callwaiting '0'
|
||||
option clir '0'
|
||||
|
||||
config 'tel_line' 'brcm4'
|
||||
option 'extension' '4444'
|
||||
option 'sip_account' 'sip0'
|
||||
option 'noise' '0'
|
||||
option 'vad' '0'
|
||||
option 'txgain' 4
|
||||
option 'rxgain' 4
|
||||
option 'echo_cancel' 1
|
||||
option 'callwaiting' '0'
|
||||
option 'clir' '0'
|
||||
config tel_line 'brcm4'
|
||||
option extension '4444'
|
||||
option sip_account 'sip0'
|
||||
option noise '0'
|
||||
option vad '0'
|
||||
option txgain 4
|
||||
option rxgain 4
|
||||
option echo_cancel 1
|
||||
option callwaiting '0'
|
||||
option clir '0'
|
||||
|
||||
config 'tel_line' 'brcm5'
|
||||
option 'extension' '5555'
|
||||
option 'sip_account' 'sip0'
|
||||
option 'noise' '0'
|
||||
option 'vad' '0'
|
||||
option 'txgain' 4
|
||||
option 'rxgain' 4
|
||||
option 'echo_cancel' 1
|
||||
option 'callwaiting' '0'
|
||||
option 'clir' '0'
|
||||
config tel_line 'brcm5'
|
||||
option extension '5555'
|
||||
option sip_account 'sip0'
|
||||
option noise '0'
|
||||
option vad '0'
|
||||
option txgain 4
|
||||
option rxgain 4
|
||||
option echo_cancel 1
|
||||
option callwaiting '0'
|
||||
option clir '0'
|
||||
|
||||
config 'tel_line' 'brcm6'
|
||||
option 'extension' '6666'
|
||||
option 'sip_account' 'sip0'
|
||||
option 'noise' '0'
|
||||
option 'vad' '0'
|
||||
option 'txgain' 4
|
||||
option 'rxgain' 4
|
||||
option 'echo_cancel' 1
|
||||
option 'callwaiting' '0'
|
||||
option 'clir' '0'
|
||||
config tel_line 'brcm6'
|
||||
option extension '6666'
|
||||
option sip_account 'sip0'
|
||||
option noise '0'
|
||||
option vad '0'
|
||||
option txgain 4
|
||||
option rxgain 4
|
||||
option echo_cancel 1
|
||||
option callwaiting '0'
|
||||
option clir '0'
|
||||
|
||||
config 'tel_line' 'brcm7'
|
||||
option 'extension' '7777'
|
||||
option 'sip_account' 'sip0'
|
||||
option 'noise' '0'
|
||||
option 'vad' '0'
|
||||
option 'txgain' 4
|
||||
option 'rxgain' 4
|
||||
option 'echo_cancel' 1
|
||||
option 'callwaiting' '0'
|
||||
option 'clir' '0'
|
||||
config tel_line 'brcm7'
|
||||
option extension '7777'
|
||||
option sip_account 'sip0'
|
||||
option noise '0'
|
||||
option vad '0'
|
||||
option txgain 4
|
||||
option rxgain 4
|
||||
option echo_cancel 1
|
||||
option callwaiting '0'
|
||||
option clir '0'
|
||||
|
||||
config 'dialplan' 'custom_dialplan'
|
||||
option 'custom_outgoing_enabled' '0'
|
||||
option 'custom_incoming_enabled' '0'
|
||||
option 'custom_hangup_enabled' '0'
|
||||
option 'all_ports_extension' '#123456'
|
||||
option 'test_audio_extension' '#123457'
|
||||
option 'test_echo_extension' '#123458'
|
||||
option 'record_message_extension' '#999999'
|
||||
config dialplan 'custom_dialplan'
|
||||
option custom_outgoing_enabled '0'
|
||||
option custom_incoming_enabled '0'
|
||||
option custom_hangup_enabled '0'
|
||||
option all_ports_extension '#123456'
|
||||
option test_audio_extension '#123457'
|
||||
option test_echo_extension '#123458'
|
||||
option record_message_extension '#999999'
|
||||
|
||||
config 'sip_advanced' 'SIP'
|
||||
option 'rtpstart' '10000'
|
||||
option 'rtpend' '20000'
|
||||
option 'dtmfmode' 'rfc2833'
|
||||
option 'remotehold' 'yes'
|
||||
option 'contact_line_suffix' '1'
|
||||
option 'registertimeoutbackoff' '512'
|
||||
option 'registerattemptsbackoff' '0'
|
||||
option 'register403timeout' '0'
|
||||
option 'register503timeout' '0'
|
||||
option 'registertimeoutguardsecs' '15'
|
||||
option 'registertimeoutguardlimit' '30'
|
||||
option 'registertimeoutguardpct' '0.2'
|
||||
config sip_advanced 'SIP'
|
||||
option rtpstart '10000'
|
||||
option rtpend '20000'
|
||||
option dtmfmode 'rfc2833'
|
||||
option remotehold 'yes'
|
||||
option contact_line_suffix '1'
|
||||
option registertimeoutbackoff '512'
|
||||
option registerattemptsbackoff '0'
|
||||
option register403timeout '0'
|
||||
option register503timeout '0'
|
||||
option registertimeoutguardsecs '15'
|
||||
option registertimeoutguardlimit '30'
|
||||
option registertimeoutguardpct '0.2'
|
||||
option defaultexpiry '300'
|
||||
option 'tls_version' 'tlsv1'
|
||||
option 'tls_cipher' 'DES-CBC3-SHA'
|
||||
option 'stun_server' ''
|
||||
option 'dnsmgr' 'no'
|
||||
option 'dnsmgr_refresh_interval' '300'
|
||||
option 'srvlookup' 'yes'
|
||||
option tls_version 'tlsv1'
|
||||
option tls_cipher 'DES-CBC3-SHA'
|
||||
option stun_server ''
|
||||
option dnsmgr 'no'
|
||||
option dnsmgr_refresh_interval '300'
|
||||
option srvlookup 'yes'
|
||||
|
||||
config 'tel_advanced' 'TEL'
|
||||
option 'country' 'SWE'
|
||||
option 'jbenable' 'yes'
|
||||
option 'jbforce' 'no'
|
||||
option 'jbmaxsize' '500'
|
||||
option 'jbimpl' 'adaptive'
|
||||
option 'genericplc' 'yes'
|
||||
option 'dialoutmsec' '4000'
|
||||
option 'cw_enable' 'yes'
|
||||
config tel_advanced 'TEL'
|
||||
option country 'SWE'
|
||||
option jbenable 'yes'
|
||||
option jbforce 'no'
|
||||
option jbmaxsize '500'
|
||||
option jbimpl 'adaptive'
|
||||
option genericplc 'yes'
|
||||
option dialoutmsec '4000'
|
||||
option cw_enable 'yes'
|
||||
|
||||
config 'features' 'features'
|
||||
option 'cbbs_enabled' '1'
|
||||
option 'callforward_enabled' '1'
|
||||
option 'callwaiting_enabled' '1'
|
||||
option 'redial_enabled' '1'
|
||||
option 'callreturn_enabled' '1'
|
||||
option 'advanced_register_settings' '1'
|
||||
config features 'features'
|
||||
option cbbs_enabled '1'
|
||||
option callforward_enabled '1'
|
||||
option callwaiting_enabled '1'
|
||||
option redial_enabled '1'
|
||||
option callreturn_enabled '1'
|
||||
option advanced_register_settings '1'
|
||||
|
||||
config log 'LOG'
|
||||
option console 'notice,warning,error'
|
||||
@@ -146,31 +146,32 @@ config ringing_status 'RINGING_STATUS'
|
||||
option shouldring '1'
|
||||
|
||||
config call_filter 'call_filter0'
|
||||
option block_foreign '0'
|
||||
option block_special_rate '0'
|
||||
option block_outgoing '0'
|
||||
option block_incoming '0'
|
||||
option block_foreign '0'
|
||||
option block_special_rate '0'
|
||||
option block_outgoing '0'
|
||||
option block_incoming '0'
|
||||
|
||||
config 'sip_service_provider' 'sip0'
|
||||
option 'name' 'Account 1'
|
||||
option 'enabled' '0'
|
||||
option 'codec0' 'alaw'
|
||||
config cdr_log 'CDR_LOG'
|
||||
option cdr_syslog '0'
|
||||
|
||||
config sip_service_provider 'sip0'
|
||||
option name 'Account 1'
|
||||
option enabled '0'
|
||||
option codec0 'alaw'
|
||||
option cbbs_key '5'
|
||||
option cbbs_maxretry '5'
|
||||
option cbbs_retrytime '300'
|
||||
option cbbs_waittime '30'
|
||||
option 'autoframing' '1'
|
||||
option 'cfim_on' '*21*'
|
||||
option 'cfim_off' '#21#'
|
||||
option 'cfbs_on' '*61*'
|
||||
option 'cfbs_off' '#61#'
|
||||
option autoframing '1'
|
||||
option cfim_on '*21*'
|
||||
option cfim_off '#21#'
|
||||
option cfbs_on '*61*'
|
||||
option cfbs_off '#61#'
|
||||
option cw_on '*43#'
|
||||
option cw_off '#43#'
|
||||
option cw_status '*#43#'
|
||||
option 'call_return' '*69'
|
||||
option 'redial' '*66'
|
||||
option 'is_fax' '0'
|
||||
option 'transport' 'udp'
|
||||
option call_return '*69'
|
||||
option redial '*66'
|
||||
option is_fax '0'
|
||||
option transport 'udp'
|
||||
|
||||
config cdr_log 'CDR_LOG'
|
||||
option cdr_syslog '0'
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
iptables -I zone_wan_input 4 -m udp -p udp --dport 10000:20000 -m comment --comment "!fw3: Allow-RTP" -j ACCEPT
|
||||
rtpstart=$(uci -q get voice_client.SIP.rtpstart)
|
||||
rtpstart=${rtpstart:-10000}
|
||||
rtpend=$(uci -q get voice_client.SIP.rtpend)
|
||||
rtpend=${rtpend:-20000}
|
||||
|
||||
iptables -I zone_wan_input -m udp -p udp --dport $rtpstart:$rtpend -m comment --comment "!fw3: Allow-RTP" -j ACCEPT
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# This file is part of luci-app-voice,
|
||||
# its purpose is to (re)create asterisk configuration files
|
||||
# from luci config file(s).
|
||||
# The purpose of this file is to (re)create asterisk
|
||||
# configuration files from voice_client UCI config file.
|
||||
#
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/network.sh
|
||||
@@ -17,10 +16,13 @@ START=60
|
||||
USE_PROCD=1
|
||||
|
||||
# Some global variables
|
||||
SERIAL=$(getSerial)
|
||||
BASEMAC=$(getBaseMAC)
|
||||
SERIAL="$(getSerial)"
|
||||
BASEMAC="$(getBaseMAC)"
|
||||
BASEMAC="${BASEMAC//:}"
|
||||
LINENAME="$(getLineName)"
|
||||
CHANNELNAME="$(getChannelName)"
|
||||
MODULENAME=voice
|
||||
USERAGENT="Inteno_${SERIAL}_${BASEMAC}"
|
||||
USERAGENT="iopsys_${SERIAL}_${BASEMAC}"
|
||||
|
||||
ASTUSER=nobody
|
||||
ASTGROUP=nogroup
|
||||
@@ -32,7 +34,7 @@ ASTERISKDIR=/etc/asterisk
|
||||
WORKDIR=/tmp/$MODULENAME.$$
|
||||
MD5SUMSFILE=/tmp/$MODULENAME-sums.$$
|
||||
|
||||
# Whitespace separated list of $(getChannelName) feature access codes
|
||||
# Whitespace separated list of $CHANNELNAME feature access codes
|
||||
CHANNEL_FAC=
|
||||
|
||||
#TODO: go through templates, check usage
|
||||
@@ -82,7 +84,7 @@ TMPL_ACL=$TEMPLATEDIR/acl.conf.TEMPLATE
|
||||
TMPL_CONFBRIDGE=$TEMPLATEDIR/confbridge.conf.TEMPLATE
|
||||
TMPL_UDPTL=$TEMPLATEDIR/udptl.conf.TEMPLATE
|
||||
|
||||
TMPL_CHANNEL=$TEMPLATEDIR/$(getLineName).conf.TEMPLATE
|
||||
TMPL_CHANNEL=$TEMPLATEDIR/$LINENAME.conf.TEMPLATE
|
||||
TMPL_CHANNEL_LINE=$TEMPLATEDIR/tel_line.TEMPLATE
|
||||
|
||||
TMPL_MEETME=$TEMPLATEDIR/meetme.conf.TEMPLATE
|
||||
@@ -151,7 +153,6 @@ assemble_and_copy_config()
|
||||
[ -f $TMPL_ASTERISK ] && cp $TMPL_ASTERISK $WORKDIR/asterisk.conf
|
||||
[ -f $TMPL_CDR ] && cp $TMPL_CDR $WORKDIR/cdr.conf
|
||||
[ -f $TMPL_CEL ] && cp $TMPL_CEL $WORKDIR/cel.conf
|
||||
[ -f $TMPL_INDICATIONS ] && cp $TMPL_INDICATIONS $WORKDIR/indications.conf
|
||||
[ -f $TMPL_MANAGER ] && cp $TMPL_MANAGER $WORKDIR/manager.conf
|
||||
[ -f $TMPL_MODULES ] && cp $TMPL_MODULES $WORKDIR/modules.conf
|
||||
[ -f $TMPL_EXTENSIONS_MACRO ] && cp $TMPL_EXTENSIONS_MACRO $WORKDIR/extensions_macro.conf
|
||||
@@ -163,6 +164,14 @@ assemble_and_copy_config()
|
||||
[ -f $TMPL_UDPTL ] && cp $TMPL_UDPTL $WORKDIR/udptl.conf
|
||||
[ -f $SPECRATECFG ] && cp $SPECRATECFG $WORKDIR/special_rate_nr.cfg
|
||||
|
||||
[ -f $TMPL_INDICATIONS ] && {
|
||||
cp $TMPL_INDICATIONS $WORKDIR/indications.conf
|
||||
|
||||
config_get country TEL country
|
||||
country_code=$(supportedCountries |grep $country |cut -d':' -f3 |tr [A-Z] [a-z])
|
||||
sed -i "s/^country=.*/country=${country_code}/g" $WORKDIR/indications.conf
|
||||
}
|
||||
|
||||
test -e $TMPL_MEETME && cp $TMPL_MEETME $WORKDIR/meetme.conf
|
||||
|
||||
# Handle extensions_extra, carry over old file to new config if there is one
|
||||
@@ -182,7 +191,7 @@ assemble_and_copy_config()
|
||||
mv $WORKDIR/sip_registrations.tmp $WORKDIR/sip_registrations.conf
|
||||
mv $WORKDIR/sip_providers.tmp $WORKDIR/sip_providers.conf
|
||||
mv $WORKDIR/sip_users.tmp $WORKDIR/sip_users.conf
|
||||
mv $WORKDIR/$(getLineName).tmp $WORKDIR/$(getLineName).conf
|
||||
mv $WORKDIR/$LINENAME.tmp $WORKDIR/$LINENAME.conf
|
||||
mv $WORKDIR/extensions.tmp $WORKDIR/extensions.conf
|
||||
mv $WORKDIR/codecs.tmp $WORKDIR/codecs.conf
|
||||
mv $WORKDIR/rtp.tmp $WORKDIR/rtp.conf
|
||||
@@ -252,95 +261,30 @@ read_codecs_ptime()
|
||||
# returns a list of lines, formatted to replace a tag with sed
|
||||
# in a Dial() command
|
||||
#
|
||||
# For backwards compatibility, if i is only a number (not prefixed by
|
||||
# "SIP/" or "CHANNEL/") then add "CHANNEL/"
|
||||
#
|
||||
read_lines()
|
||||
{
|
||||
local lines=""
|
||||
local call_lines
|
||||
local fxsIdx fxsEpt dectIdx dectEpt
|
||||
local line call_lines lines clength
|
||||
|
||||
# Are lines already set by user conf?
|
||||
config_get call_lines $1 call_lines
|
||||
|
||||
# Otherwise set default depending on board HW. This
|
||||
# is only done at very first boot or a default reset.
|
||||
if test -z "$call_lines"; then
|
||||
# Get all FSX voice endpoints. Translate to uppercase with awk
|
||||
# due to tr [:upper:] doesn't work in our BusyBox.
|
||||
voicePorts=$(db get hw.board.VoicePortOrder | \
|
||||
awk '{ print toupper($0) }' | \
|
||||
sed -e "s/\([[:alpha:]]*\)\([[:digit:]]\)/\1\/\2/g")
|
||||
voiceNames=$(db get hw.board.VoicePortNames)
|
||||
hasVoice=0
|
||||
for line in $call_lines ; do
|
||||
|
||||
if test $(db get hw.board.hasVoice) = "1"; then
|
||||
# Get the first FSX voice endpoint index by
|
||||
# searching for the name usually used.
|
||||
fxsIdx=$(echo $voiceNames | \
|
||||
awk -e '{
|
||||
i = 1;
|
||||
while(i <= NF && tolower($i) !~ /^tel.*$/) {
|
||||
i++;
|
||||
}
|
||||
print i;
|
||||
}'
|
||||
)
|
||||
|
||||
# Convert index to endpoint ID
|
||||
if test $fxsIdx -gt 0; then
|
||||
fxsEpt=$(echo $voicePorts | awk '{ print $'$fxsIdx' }')
|
||||
fi
|
||||
|
||||
hasVoice=1
|
||||
fi
|
||||
|
||||
if test $(db get hw.board.hasDect) = "1"; then
|
||||
# Get the first Dect voice endpoint index by
|
||||
# searching for the name usually used.
|
||||
dectIdx=$(echo $voiceNames | \
|
||||
awk -e '{
|
||||
i = 1;
|
||||
while(i <= NF && tolower($i) !~ /^dect.*$/) {
|
||||
i++;
|
||||
}
|
||||
print i;
|
||||
}
|
||||
')
|
||||
|
||||
if test $dectIdx -gt 0; then
|
||||
dectEpt=$(echo $voicePorts | awk '{ print $'$dectIdx' }')
|
||||
fi
|
||||
|
||||
hasVoice=1
|
||||
fi
|
||||
|
||||
if test $hasVoice -eq 1; then
|
||||
call_lines="$dectEpt $fxsEpt"
|
||||
# Remove leading/trailing spaces
|
||||
call_lines=$(echo $call_lines | xargs echo -n)
|
||||
|
||||
# If we didn't find any endpoint ID we
|
||||
# fallback to activate them all.
|
||||
if test -z "$call_lines"; then
|
||||
call_lines="$voicePorts"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Save the endpoint IDs we found where the
|
||||
# GUI expects to find them.
|
||||
uci_set voice_client "${1}" "call_lines" "$call_lines"
|
||||
uci_commit voice_client
|
||||
fi
|
||||
|
||||
for i in $call_lines ; do
|
||||
case $i in
|
||||
''|*[!0-9]*) lines=$lines"$i&" ;;
|
||||
*) lines=$lines"$(getChannelName)/$i&" ;;
|
||||
# convert line format to <LINENAME><LINEID>
|
||||
case $line in
|
||||
[0-9])
|
||||
;;
|
||||
"$CHANNELNAME"/[0-9])
|
||||
# get the index from channel name
|
||||
clength=$(echo $CHANNELNAME | wc -c)
|
||||
line="${line:$clength}"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
[ -n "$line" ] || continue
|
||||
|
||||
lines="$lines$CHANNELNAME/$line&"
|
||||
done
|
||||
|
||||
lines=$(escape_sed_substitution $lines)
|
||||
echo "${lines%??}"
|
||||
}
|
||||
@@ -720,29 +664,25 @@ configure_sip_provider()
|
||||
local autoframing
|
||||
local encryption
|
||||
|
||||
config_get enabled $1 enabled
|
||||
config_get enabled $1 enabled "0"
|
||||
config_get domain $1 domain
|
||||
config_get host $1 host
|
||||
config_get host $1 host "$domain"
|
||||
config_get port $1 port
|
||||
config_get outboundproxy $1 outboundproxy
|
||||
config_get outboundproxyport $1 outboundproxyport
|
||||
config_get user $1 user
|
||||
config_get authuser $1 authuser
|
||||
config_get secret $1 secret
|
||||
config_get is_fax $1 is_fax
|
||||
config_get autoframing $1 autoframing
|
||||
config_get transport $1 transport
|
||||
config_get encryption $1 encryption
|
||||
config_get is_fax $1 is_fax "0"
|
||||
config_get autoframing $1 autoframing "0"
|
||||
config_get transport $1 transport "udp"
|
||||
config_get encryption $1 encryption "0"
|
||||
|
||||
# This is a hack to fix security issue #14962
|
||||
user=${user//"'"/}
|
||||
authuser=${authuser//"'"/}
|
||||
|
||||
if [ -z "$transport" ] ; then
|
||||
transport="udp"
|
||||
fi
|
||||
|
||||
if [ -z "$enabled" -o "$enabled" = "0" ] ; then
|
||||
if [ "$enabled" == "0" ] ; then
|
||||
return
|
||||
fi
|
||||
|
||||
@@ -753,10 +693,6 @@ configure_sip_provider()
|
||||
|
||||
echo "Configuring SIP Provider $1"
|
||||
|
||||
if [ -z "$host" ] ; then
|
||||
host=$domain
|
||||
fi
|
||||
|
||||
# Get secret from existing asterisk config if its not set in luci config
|
||||
if [ -z "$secret" ] ; then
|
||||
echo "Restoring secret from old config for $1"
|
||||
@@ -803,23 +739,20 @@ configure_sip_provider()
|
||||
fi
|
||||
|
||||
# Set or remove encryption
|
||||
if [ -z "$encryption" -o "$encryption" == "0" ] ; then
|
||||
if [ "$encryption" == "0" ] ; then
|
||||
sed -i "/|ENCRYPTION|/d" $WORKDIR/sip_provider.tmp
|
||||
else
|
||||
sed -i "s/|ENCRYPTION|/yes/g" $WORKDIR/sip_provider.tmp
|
||||
fi
|
||||
|
||||
# Force ulaw/alaw if fax, otherwise read selected codecs
|
||||
if [ -z "$is_fax" -o "$is_fax" = "1" ] ; then
|
||||
if [ "$is_fax" == "1" ] ; then
|
||||
sed -i "s/|ALLOW|/allow = ulaw\nallow = alaw/" $WORKDIR/sip_provider.tmp
|
||||
else
|
||||
sed -i "s/|ALLOW|/$(read_codecs_ptime $1)/" $WORKDIR/sip_provider.tmp
|
||||
fi
|
||||
|
||||
# Autoframing
|
||||
if [ -z "$autoframing" ] ; then
|
||||
autoframing=0
|
||||
fi
|
||||
sed -i "s/|AUTOFRAMING|/$autoframing/" $WORKDIR/sip_provider.tmp
|
||||
|
||||
# Set registered extension so that incoming calls match the correct peer
|
||||
@@ -1032,9 +965,9 @@ configure_queue()
|
||||
do
|
||||
local out=""
|
||||
re='^[0-9]+$'
|
||||
num=${member#$(getLineName)}
|
||||
num=${member#$LINENAME}
|
||||
if [ -z "${num##[0-9]*}" ] ; then
|
||||
out="$(getChannelName)/$num"
|
||||
out="$CHANNELNAME/$num"
|
||||
else
|
||||
local sip_user
|
||||
config_get sip_user $member user
|
||||
@@ -1688,7 +1621,7 @@ configure_extensions_provider()
|
||||
echo "exten => $user,n(norewrite),NoOp()">> $tmp
|
||||
|
||||
# read a list of lines that should be dialled on incoming calls
|
||||
incoming_lines=$(read_lines $1)
|
||||
incoming_lines="$(read_lines $1)"
|
||||
config_get call_queue $1 call_queue
|
||||
config_get call_ivr $1 call_ivr
|
||||
if [ -n "$incoming_lines" ]; then
|
||||
@@ -1737,7 +1670,7 @@ configure_tel_line_extension()
|
||||
local cbbs_retrytime
|
||||
local cbbs_waittime
|
||||
local mailbox
|
||||
local line_name=$(getLineName)
|
||||
local line_name=$LINENAME
|
||||
|
||||
line=${1:${#line_name}}
|
||||
config_get extension $1 extension
|
||||
@@ -1842,11 +1775,11 @@ configure_codecs()
|
||||
}
|
||||
|
||||
#
|
||||
# Configure default settings for $(getLineName).conf
|
||||
# Configure default settings for $LINENAME.conf
|
||||
#
|
||||
configure_tel()
|
||||
{
|
||||
echo "Configuring $(getChannelName)"
|
||||
echo "Configuring $CHANNELNAME"
|
||||
local jbenable
|
||||
local jbforce
|
||||
local jbmaxsize
|
||||
@@ -1855,6 +1788,8 @@ configure_tel()
|
||||
local dialoutmsec
|
||||
local fac
|
||||
local echocancel
|
||||
local hold_target_before_refer
|
||||
local calleridtype
|
||||
|
||||
config_get jbenable TEL jbenable
|
||||
config_get jbforce TEL jbforce
|
||||
@@ -1864,6 +1799,8 @@ configure_tel()
|
||||
config_get dialoutmsec TEL dialoutmsec
|
||||
config_get fac TEL fac
|
||||
config_get echocancel TEL echo_cancel
|
||||
config_get hold_target_before_refer TEL hold_target_before_refer
|
||||
config_get calleridtype TEL calleridtype
|
||||
|
||||
CHANNEL_FAC="$CHANNEL_FAC $fac"
|
||||
# Convert whitespace to commas
|
||||
@@ -1873,29 +1810,40 @@ configure_tel()
|
||||
dialoutmsec=4000
|
||||
fi
|
||||
|
||||
sed -i "s/|JBENABLE|/$jbenable/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|JBFORCE|/$jbforce/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|JBMAXSIZE|/$jbmaxsize/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|JBIMPL|/$jbimpl/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|DIALOUTMSEC|/$dialoutmsec/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|FAC|/$CHANNEL_FAC/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|CHANNELS|/$(db get hw.board.VoicePorts)/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|ECHOCANCEL|/$(getEchoCancellingValue $echocancel)/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|JBENABLE|/$jbenable/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|JBFORCE|/$jbforce/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|JBMAXSIZE|/$jbmaxsize/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|JBIMPL|/$jbimpl/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|DIALOUTMSEC|/$dialoutmsec/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|FAC|/$CHANNEL_FAC/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|CHANNELS|/$(db get hw.board.VoicePorts)/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|ECHOCANCEL|/$(getEchoCancellingValue $echocancel)/" $WORKDIR/$LINENAME.tmp
|
||||
|
||||
if [ -n "${calleridtype}" ] ; then
|
||||
sed -i "s/^calleridtype *=.*/calleridtype = ${calleridtype}/g" $WORKDIR/$LINENAME.tmp
|
||||
else
|
||||
sed -i "/^calleridtype *=.*/d" $WORKDIR/$LINENAME.tmp
|
||||
fi
|
||||
|
||||
if [ "$dtmfmode" == "compatibility" ] ; then
|
||||
dtmfcompatibility="1"
|
||||
else
|
||||
dtmfcompatibility="0"
|
||||
fi
|
||||
sed -i "s/|DTMFCOMPATIBILITY|/$dtmfcompatibility/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|DTMFCOMPATIBILITY|/$dtmfcompatibility/" $WORKDIR/$LINENAME.tmp
|
||||
|
||||
if [ "$hold_target_before_refer" == "no" ]; then
|
||||
sed -i "s/|HOLDTARGET|/no/" $WORKDIR/$LINENAME.tmp
|
||||
else
|
||||
sed -i "s/|HOLDTARGET|/yes/" $WORKDIR/$LINENAME.tmp
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Configure settings for individual line in $(getLineName).conf
|
||||
# Configure settings for individual line in $LINENAME.conf
|
||||
#
|
||||
configure_tel_line()
|
||||
{
|
||||
echo "Configuring $(getChannelName) line $1"
|
||||
local extension
|
||||
local sip_provider
|
||||
local codecs
|
||||
@@ -1917,11 +1865,9 @@ configure_tel_line()
|
||||
config_get clir $1 clir
|
||||
|
||||
#If line is configured with no sip_provider, or sip_provider is disabled, use local_extensions context
|
||||
[ -n "$sip_provider" ] && {
|
||||
config_get sip_provider_user $sip_provider user
|
||||
config_get sip_provider_enabled $sip_provider enabled
|
||||
}
|
||||
if [ -z "$sip_provider" -o "$sip_provider" == "-" -o -z "$sip_provider_enabled" -o "$sip_provider_enabled" == "0" -o -z "$sip_provider_user" ] ; then
|
||||
config_get sip_provider_user $sip_provider user
|
||||
config_get sip_provider_enabled $sip_provider enabled
|
||||
if [ "$sip_provider" == "-" -o -z "$sip_provider_enabled" -o "$sip_provider_enabled" == "0" -o -z "$sip_provider_user" ] ; then
|
||||
sip_provider="local_extensions"
|
||||
fi
|
||||
|
||||
@@ -1954,7 +1900,7 @@ configure_tel_line()
|
||||
sed -i "s/|DTMFRELAY|/$dtmfmode/" $WORKDIR/tel_line.tmp
|
||||
sed -i "s/|CALLWAITING|/$callwaiting/" $WORKDIR/tel_line.tmp
|
||||
sed -i "s/|CLIR|/$clir/" $WORKDIR/tel_line.tmp
|
||||
sed -i "s/|LINE_NAME|/$(getLineName)/" $WORKDIR/tel_line.tmp
|
||||
sed -i "s/|LINE_NAME|/$LINENAME/" $WORKDIR/tel_line.tmp
|
||||
|
||||
#Configure CHANNEL line with codecs according to the SIP line settings
|
||||
# local is_fax
|
||||
@@ -1965,7 +1911,7 @@ configure_tel_line()
|
||||
# sed -i "s/|ALLOW|/$(read_codecs $sip_provider)/" $WORKDIR/tel_line.tmp
|
||||
# fi
|
||||
|
||||
cat $WORKDIR/tel_line.tmp >> $WORKDIR/$(getLineName).tmp
|
||||
cat $WORKDIR/tel_line.tmp >> $WORKDIR/$LINENAME.tmp
|
||||
rm -f $WORKDIR/tel_line.tmp
|
||||
}
|
||||
|
||||
@@ -2064,57 +2010,15 @@ pbx_fix_ownership()
|
||||
chown $ASTUSER:$ASTGROUP -R $ASTDIRSRECURSIVE
|
||||
}
|
||||
|
||||
# Set voice_client.LINE_x.sip_account correctly as per "voice_client.sipX.call_lines"
|
||||
set_line_sip_account()
|
||||
{
|
||||
local tel_line=$1
|
||||
local old_sip_account=
|
||||
local new_sip_account=
|
||||
local line_name=$(getLineName)
|
||||
local line_name_len=${#line_name}
|
||||
local lnum=${tel_line:${line_name_len}}
|
||||
local chan_name=$(getChannelName)
|
||||
local ___type="sip_service_provider"
|
||||
local section cfgtype call_lines chan_num
|
||||
|
||||
config_get old_sip_account $tel_line sip_account
|
||||
|
||||
# Note: On Intel platform, tel_line's section name starts with 0, e.g. tapi0.
|
||||
# But channel index in voice_client.sipX.call_lines starts with 1, e.g. TAPI/1
|
||||
if [ "$line_name" == "tapi" ]; then
|
||||
chan_num=$((lnum+1))
|
||||
else
|
||||
chan_num=$lnum
|
||||
fi
|
||||
|
||||
for section in ${CONFIG_SECTIONS}; do
|
||||
config_get cfgtype "$section" TYPE
|
||||
[ -n "$___type" -a "x$cfgtype" != "x$___type" ] && continue
|
||||
config_get call_lines "$section" call_lines
|
||||
# Note: tel_line's section name starts with 0, e.g. tapi0 or brcm0.
|
||||
# But channel index in voice_client.sipX.call_lines starts with 1, e.g. TAPI/1
|
||||
[ -n "$call_lines" ] && echo "$call_lines" | grep -q "$chan_name/$chan_num" && {
|
||||
# Append this sip_acount to the tel line
|
||||
if [ -z "$new_sip_account" ]; then
|
||||
new_sip_account="$section"
|
||||
else
|
||||
new_sip_account="$new_sip_account $section"
|
||||
fi
|
||||
}
|
||||
done
|
||||
|
||||
[ "$old_sip_account" != "$new_sip_account" ] && uci_set voice_client $tel_line sip_account "$new_sip_account"
|
||||
}
|
||||
|
||||
#
|
||||
# Calculate a name for each $(getLineName) line, depending on port type
|
||||
# Calculate a name for each $LINENAME line, depending on port type
|
||||
# and number. The name is used to make UI look better.
|
||||
#
|
||||
set_line_name()
|
||||
{
|
||||
local maxlinenum=$2
|
||||
local curname name_ix ix item lnum
|
||||
local line_name=$(getLineName)
|
||||
local line_name=$LINENAME
|
||||
local line_name_len=${#line_name}
|
||||
local tel_line=$1
|
||||
|
||||
@@ -2202,12 +2106,6 @@ start_service() {
|
||||
# Load config file
|
||||
config_load voice_client
|
||||
|
||||
########################################################
|
||||
# Set line sip_account according to sip accounts'
|
||||
# settings
|
||||
########################################################
|
||||
config_foreach set_line_sip_account tel_line
|
||||
|
||||
########################################################
|
||||
# Set line names according to board parameters
|
||||
# and delete non-existing lines from voice_client config
|
||||
@@ -2216,9 +2114,6 @@ start_service() {
|
||||
config_foreach set_line_name tel_line $maxlinenum
|
||||
uci_commit voice_client
|
||||
|
||||
# Reload the config since it has changed
|
||||
config_load voice_client
|
||||
|
||||
#######################################
|
||||
# Create temporary files from templates
|
||||
#######################################
|
||||
@@ -2229,7 +2124,7 @@ start_service() {
|
||||
cp $TMPL_SIP $WORKDIR/sip.tmp
|
||||
cp $TMPL_RTP $WORKDIR/rtp.tmp
|
||||
cp $TMPL_STUN $WORKDIR/res_stun_monitor.tmp
|
||||
cp $TMPL_CHANNEL $WORKDIR/$(getLineName).tmp
|
||||
cp $TMPL_CHANNEL $WORKDIR/$LINENAME.tmp
|
||||
cp $TMPL_CODECS $WORKDIR/codecs.tmp
|
||||
cp $TMPL_VOICEMAIL $WORKDIR/voicemail.tmp
|
||||
cp $TMPL_DNSMGR $WORKDIR/dnsmgr.tmp
|
||||
@@ -2350,6 +2245,7 @@ reload_service() {
|
||||
# FXS channel module must be reloaded before sip module. Otherwise some attributes like
|
||||
# line's registration state which is updated by SIP module through callback might be
|
||||
# reset.
|
||||
asterisk -rx "config reload $ASTERISKDIR/indications.conf"
|
||||
asterisk -rx "$(getChipVendor) reload"
|
||||
asterisk -rx "config reload $ASTERISKDIR/sip.conf"
|
||||
sleep 1
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# Adapt to config section name changes
|
||||
grep -q brcm_line /etc/config/voice_client && sed -i 's/brcm_line/tel_line/g' /etc/config/voice_client
|
||||
grep -q brcm_advanced /etc/config/voice_client && sed -i 's/brcm_advanced/tel_advanced/g' /etc/config/voice_client
|
||||
grep -q BRCM /etc/config/voice_client && sed -i 's/BRCM\///g' /etc/config/voice_client
|
||||
grep -q BRCM /etc/config/voice_client && sed -i 's/BRCM/TEL/g' /etc/config/voice_client
|
||||
|
||||
# Add call filter section
|
||||
@@ -36,27 +37,6 @@ EOT
|
||||
|
||||
}
|
||||
|
||||
# Default phone volume for iopsysWrt 4.X.
|
||||
uci -q batch <<-EOT
|
||||
set voice_client.$(getLineName)0.txgain=4
|
||||
set voice_client.$(getLineName)0.rxgain=4
|
||||
set voice_client.$(getLineName)1.txgain=4
|
||||
set voice_client.$(getLineName)1.rxgain=4
|
||||
set voice_client.$(getLineName)2.txgain=4
|
||||
set voice_client.$(getLineName)2.rxgain=4
|
||||
set voice_client.$(getLineName)3.txgain=4
|
||||
set voice_client.$(getLineName)3.rxgain=4
|
||||
set voice_client.$(getLineName)4.txgain=4
|
||||
set voice_client.$(getLineName)4.rxgain=4
|
||||
set voice_client.$(getLineName)5.txgain=4
|
||||
set voice_client.$(getLineName)5.rxgain=4
|
||||
set voice_client.$(getLineName)6.txgain=4
|
||||
set voice_client.$(getLineName)6.rxgain=4
|
||||
set voice_client.$(getLineName)7.txgain=4
|
||||
set voice_client.$(getLineName)7.rxgain=4
|
||||
commit voice_client
|
||||
EOT
|
||||
|
||||
# Add firewall include
|
||||
uci -q batch <<-EOT
|
||||
delete firewall.sip
|
||||
|
||||
@@ -22,7 +22,7 @@ getBaseMAC() {
|
||||
}
|
||||
|
||||
getAllLines() {
|
||||
echo "BRCM/0&BRCM/1&BRCM/2&BRCM/3&BRCM/4&BRCM/5&BRCM/6"
|
||||
echo "BRCM/0&BRCM/1&BRCM/2&BRCM/3&BRCM/4&BRCM/5"
|
||||
}
|
||||
|
||||
getLineIdx() {
|
||||
@@ -43,3 +43,32 @@ getEchoCancellingValue() {
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
supportedCountries() {
|
||||
echo "Australia:AUS"
|
||||
echo "Belgium:BEL"
|
||||
echo "Brazil:BRA"
|
||||
echo "Chile:CHL"
|
||||
echo "China:CHN"
|
||||
echo "Czech:CZE"
|
||||
echo "Denmark:DNK"
|
||||
echo "ETSI:ETS"
|
||||
echo "Finland:FIN"
|
||||
echo "France:FRA"
|
||||
echo "Germany:DEU"
|
||||
echo "Hungary:HUN"
|
||||
echo "India:IND"
|
||||
echo "Italy:ITA"
|
||||
echo "Japan:JPN"
|
||||
echo "Netherlands:NLD"
|
||||
echo "New Zealand:NZL"
|
||||
echo "North America:USA"
|
||||
echo "Spain:ESP"
|
||||
echo "Sweden:SWE"
|
||||
echo "Switzerland:CHE"
|
||||
echo "Norway:NOR"
|
||||
echo "Taiwan:TWN"
|
||||
echo "United Kingdoms:GRB"
|
||||
echo "United Arab Emirates:ARE"
|
||||
echo "CFG TR57:T57"
|
||||
}
|
||||
|
||||
@@ -14,12 +14,12 @@ getLineName() {
|
||||
}
|
||||
|
||||
getSerial() {
|
||||
sernum=$(fw_printenv -n serial_number) 2> /dev/null
|
||||
sernum="$(fw_printenv -n serial_number 2> /dev/null)"
|
||||
|
||||
if [ $? ]; then
|
||||
echo 0
|
||||
else
|
||||
echo $sernum
|
||||
else
|
||||
echo 0
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -28,12 +28,11 @@ getBaseMAC() {
|
||||
}
|
||||
|
||||
getAllLines() {
|
||||
echo "TAPI/1&TAPI/2&TAPI/3&TAPI/4&TAPI/5&TAPI/6"
|
||||
echo "TAPI/0&TAPI/1"
|
||||
}
|
||||
|
||||
getLineIdx() {
|
||||
i=$1
|
||||
echo $((i+1))
|
||||
echo $1
|
||||
}
|
||||
|
||||
getEchoCancellingValue() {
|
||||
@@ -50,3 +49,16 @@ getEchoCancellingValue() {
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
supportedCountries() {
|
||||
echo "Austria:AUT:AT"
|
||||
echo "Denmark:DNK:DK"
|
||||
echo "Estonia:EST:EE"
|
||||
echo "Germany:DEU:DE"
|
||||
echo "Netherlands:NLD:NL"
|
||||
echo "Norway:NOR:NO"
|
||||
echo "Spain:ESP:ES"
|
||||
echo "Sweden:SWE:SE"
|
||||
echo "Switzerland:CHE:CH"
|
||||
echo "United Kingdom:GBR:UK"
|
||||
}
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/voice/voicelib.sh
|
||||
|
||||
LOGFILE="/var/log/asterisk/cdr-csv/Master.csv"
|
||||
|
||||
case "$1" in
|
||||
list)
|
||||
echo '{ "status" : {}, "lines" : {}, "codecs" : {}, "call_log" : {}, "platform" : {} }'
|
||||
echo '{ "status" : {}, "lines" : {}, "codecs" : {}, "call_log" : {}, "platform" : {}, "supported_countries" : {} }'
|
||||
|
||||
;;
|
||||
call)
|
||||
@@ -91,39 +93,72 @@ case "$1" in
|
||||
json_init
|
||||
json_add_array "call_log"
|
||||
|
||||
[ -f /var/log/asterisk/cdr-csv/Master.csv ] || {
|
||||
[ -f ${LOGFILE} ] || {
|
||||
json_dump
|
||||
return
|
||||
}
|
||||
|
||||
while read -r line
|
||||
do
|
||||
line="$(echo $line | tr -d '\"')"
|
||||
uniqueid="$(echo $line | awk -F',' '{print $(NF-1)}')"
|
||||
echo $uniqueid | grep "[A-Z,a-z]" && continue
|
||||
from="$(echo $line | cut -d',' -f2)"
|
||||
to="$(echo $line | cut -d',' -f3)"
|
||||
callok=0
|
||||
uci show voice_client | grep user | grep -wq "$from" && callok=1
|
||||
uci show voice_client | grep user | grep -wq "$to" && callok=1
|
||||
[ $callok -eq 0 ] && continue
|
||||
account="$(echo $line | cut -d',' -f4)"
|
||||
uci show voice_client | grep sip_service_provider | grep -wq "$account" || continue
|
||||
timestart="$(echo $line | awk -F',' '{print $(NF-8)}')"
|
||||
timend="$(echo $line | awk -F',' '{print $(NF-6)}')"
|
||||
startdate=$(date -u -d "$timestart" +"%s")
|
||||
enddate=$(date -u -d "$timend" +"%s")
|
||||
uci show voice_client | grep user | grep -wq "$from" && direction="OUTGOING" || direction="INCOMING"
|
||||
tail -200 ${LOGFILE} | sed -n '1!G;h;$p' > ${LOGFILE}.tmp
|
||||
num_entries=0
|
||||
|
||||
sip_service_providers=$(uci show voice_client | grep sip_service_provider)
|
||||
sip_user=$(uci show voice_client | grep user)
|
||||
|
||||
old_ifs=$IFS
|
||||
while read -r line
|
||||
do
|
||||
line_whithout_quotes=$(echo $line | tr -d '"')
|
||||
IFS=,
|
||||
set -- $line_whithout_quotes
|
||||
IFS=$old_ifs
|
||||
n_args=$#
|
||||
eval "uniqueid=\$$n_args"
|
||||
case $uniqueid in
|
||||
[A-Z,a-z]+) continue ;;
|
||||
esac
|
||||
source="$2"
|
||||
destination="$3"
|
||||
# "source" will be empty for call log of internal call (beween extension numbers)
|
||||
[ -z "$source" ] && [ -z "$destination" ] && continue
|
||||
account="$4"
|
||||
#Filter out a trailing -outgoing from the SIP account name
|
||||
#This will have been added if a direct_dial number was used
|
||||
account=${account%-outgoing}
|
||||
actok=0
|
||||
# match "sip0" in "voice_client.sip0=sip_service_provider"
|
||||
case $sip_service_providers in
|
||||
*.$account=*) actok=1 ;;
|
||||
esac
|
||||
[ "$account" == "call_line" ] && actok=1
|
||||
[ $actok -eq 0 ] && continue
|
||||
ts=$((n_args-7))
|
||||
eval "time_start=\$$ts"
|
||||
dp=$((n_args-2))
|
||||
eval "disposition=\$$dp"
|
||||
# match "user0" from "voice_client.user0=sip_user"
|
||||
case $sip_user in
|
||||
*.$source=*) direction="OUTGOING" ;;
|
||||
*) direction="INCOMING" ;;
|
||||
esac
|
||||
du=$((n_args-4))
|
||||
eval "duration=\$$du"
|
||||
|
||||
json_add_object ""
|
||||
json_add_string uniqueid "$uniqueid"
|
||||
json_add_string time "$timestart"
|
||||
json_add_int duration $((enddate - startdate))
|
||||
json_add_string disposition "$(echo $line | awk -F',' '{print $(NF-3)}')"
|
||||
json_add_string direction "$direction"
|
||||
json_add_string from "$from"
|
||||
json_add_string to "$to"
|
||||
json_add_string uniqueid "$uniqueid"
|
||||
json_add_string time "$time_start"
|
||||
json_add_int duration "$duration"
|
||||
json_add_string disposition "$disposition"
|
||||
json_add_string direction "$direction"
|
||||
json_add_string from "$source"
|
||||
json_add_string to "$destination"
|
||||
json_select ..
|
||||
done < /var/log/asterisk/cdr-csv/Master.csv
|
||||
|
||||
num_entries=$((num_entries+1))
|
||||
if [ $num_entries -ge 100 ]; then
|
||||
break
|
||||
fi
|
||||
done < ${LOGFILE}.tmp
|
||||
rm ${LOGFILE}.tmp
|
||||
json_dump
|
||||
;;
|
||||
platform)
|
||||
@@ -136,8 +171,8 @@ case "$1" in
|
||||
json_add_int chanoffset 0
|
||||
;;
|
||||
"tapi")
|
||||
json_add_int lineoffset 1
|
||||
json_add_int chanoffset -1
|
||||
json_add_int lineoffset 0
|
||||
json_add_int chanoffset 0
|
||||
;;
|
||||
*)
|
||||
# Error, unknown platform
|
||||
@@ -146,6 +181,22 @@ case "$1" in
|
||||
|
||||
json_dump
|
||||
;;
|
||||
supported_countries)
|
||||
vcf="/tmp/voice.supported_countries"
|
||||
supportedCountries > $vcf
|
||||
json_init
|
||||
json_add_array countries
|
||||
while IFS= read -r line
|
||||
do
|
||||
json_add_object ""
|
||||
json_add_string country "$(echo $line | cut -d':' -f1)"
|
||||
json_add_string code "$(echo $line | cut -d':' -f2)"
|
||||
json_select ..
|
||||
done < "$vcf"
|
||||
|
||||
json_dump
|
||||
rm -f $vcf
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -49,6 +49,11 @@ set_ringing_schedule() {
|
||||
stop_hour=$(echo $stop | awk -F ':' '{print$1}')
|
||||
stop_min=$(echo $stop | awk -F ':' '{print$2}')
|
||||
|
||||
[ "${start_min//[0-9]/}" = "" ] || return
|
||||
[ "${start_hour//[0-9]/}" = "" ] || return
|
||||
[ "${stop_min//[0-9]/}" = "" ] || return
|
||||
[ "${stop_hour//[0-9]/}" = "" ] || return
|
||||
|
||||
daymatch=0
|
||||
for day in $days; do
|
||||
[ "${day:0:3}" == "$current_day" ] && daymatch=1
|
||||
@@ -56,6 +61,8 @@ set_ringing_schedule() {
|
||||
[ -n "$dayns" ] && dayns="$dayns,$dayn" || dayns="$dayn"
|
||||
done
|
||||
|
||||
[ "${dayns//[0-6,\-]/}" = "" ] || return
|
||||
|
||||
if [ $daymatch -eq 1 -a $current_time -gt ${start/:/} -a $current_time -lt ${stop/:/} ]; then
|
||||
timematch=1
|
||||
uci -q set voice_client.RINGING_STATUS.shouldring="$status"
|
||||
|
||||
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
PKG_NAME:=voicesec
|
||||
PKG_VERSION:=1.0
|
||||
|
||||
PKG_SOURCE_URL:=git@dev.iopsys.eu:iopsys/voicesec.git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/voicesec.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=661c0091e579e284712aeed892e921cc84a6f0bb
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wifilife
|
||||
PKG_VERSION:=1.0.3
|
||||
PKG_VERSION:=1.4.16
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=fe0e8fd3832ef3a70ac3938f9b458d05a349b0be
|
||||
PKG_SOURCE_VERSION:=0486af24db19541f63c52d0fa4f2da5b7b727fc1
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
ifeq ($(CONFIG_WIFILIFE_OPEN),y)
|
||||
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(TARGET_PROD)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
else
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git@dev.iopsys.eu:iopsys/wifilife.git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifilife.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
endif
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ remove_mbid_rules() {
|
||||
old_rule=${old_rule/-A /-D }
|
||||
eval $old_rule 2>/dev/null
|
||||
done
|
||||
rm /tmp/mbid_rules
|
||||
rm -f /tmp/mbid_rules
|
||||
}
|
||||
|
||||
# read firewall parental rules and add repeated addresses
|
||||
@@ -58,10 +58,15 @@ append_mbid_rules() {
|
||||
done
|
||||
}
|
||||
|
||||
finish() {
|
||||
rm -f /tmp/mbid.lock
|
||||
}
|
||||
trap finish EXIT INT TERM
|
||||
|
||||
while [ -f /tmp/mbid.lock ]; do
|
||||
sleep 2
|
||||
done
|
||||
touch /tmp/mbid.lock
|
||||
remove_mbid_rules
|
||||
append_mbid_rules
|
||||
rm /tmp/mbid.lock
|
||||
rm -f /tmp/mbid.lock
|
||||
|
||||
@@ -7,12 +7,55 @@ ENABLE=/tmp/owsd_enable
|
||||
USE_PROCD=1
|
||||
EXTRA_COMMANDS="enable_check"
|
||||
|
||||
# Check if 5g wifi interface is enabled or not
|
||||
is_5g_enabled()
|
||||
{
|
||||
. /lib/functions.sh
|
||||
|
||||
found=0
|
||||
radio=""
|
||||
check_radio()
|
||||
{
|
||||
local disabled band
|
||||
config_get_bool disabled $1 disabled "0"
|
||||
[ "$disabled" == "1" ] && return
|
||||
|
||||
config_get band $1 band ""
|
||||
[ "$band" == "a" ] && radio=$1
|
||||
}
|
||||
|
||||
check_iface()
|
||||
{
|
||||
local disabled ifname
|
||||
config_get_bool disabled $1 disabled "0"
|
||||
[ "$disabled" == "1" ] && return
|
||||
|
||||
config_get ifname $1 ifname ""
|
||||
[ "$ifname" == "$radio" ] && found=1
|
||||
}
|
||||
|
||||
config_load wireless
|
||||
config_foreach check_radio wifi-device
|
||||
|
||||
# not found
|
||||
[ "$radio" == "" ] && return 1
|
||||
|
||||
config_foreach check_iface wifi-iface
|
||||
|
||||
[ $found -eq 1 ] && return 0 || return 1
|
||||
}
|
||||
|
||||
start_service() {
|
||||
[ "$(uci -q get wifilife.@wifilife[0].enabled)" == "0" ] && return
|
||||
|
||||
# only start wifilife when there is 5g interface enabled
|
||||
if ! is_5g_enabled; then
|
||||
return
|
||||
fi
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG} -d -l -f -o /tmp/wifiagent.log
|
||||
procd_set_param limits core="unlimited"
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
@@ -22,6 +65,7 @@ start_service() {
|
||||
if [ "$enable" == "1" ]; then
|
||||
echo $enable > $ENABLE
|
||||
procd_set_param command ${PROG} -c -d -l -f -o /tmp/wificntlr.log
|
||||
procd_set_param limits core="unlimited"
|
||||
fi
|
||||
procd_close_instance
|
||||
}
|
||||
@@ -57,5 +101,6 @@ enable_check() {
|
||||
|
||||
service_triggers() {
|
||||
procd_add_config_trigger "config.change" "wifilife" /etc/init.d/wifilife reload
|
||||
procd_add_config_trigger "config.change" "wireless" /etc/init.d/wifilife reload
|
||||
procd_add_config_trigger "config.change" "owsd" /etc/init.d/wifilife enable_check
|
||||
}
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
add_owsd_object_wifi() {
|
||||
local wifi=$(uci -q get owsd.ubusproxy.object | grep wifi*)
|
||||
if [ -z "$wifi" ]; then
|
||||
uci -q add_list owsd.ubusproxy.object="wifi*"
|
||||
uci commit owsd
|
||||
fi
|
||||
uci -q del_list owsd.ubusproxy.object="router.system"
|
||||
uci -q del_list owsd.ubusproxy.object="wifix"
|
||||
uci -q del_list owsd.ubusproxy.object="wifi.*"
|
||||
uci -q add_list owsd.ubusproxy.object="router.system"
|
||||
uci -q add_list owsd.ubusproxy.object="wifix"
|
||||
uci -q add_list owsd.ubusproxy.object="wifi.*"
|
||||
uci commit owsd
|
||||
}
|
||||
|
||||
add_dnsmasq_lease_hwmask() {
|
||||
|
||||
@@ -8,7 +8,7 @@ PKG_NAME:=wifimngr
|
||||
PKG_VERSION:=1.0.2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=8fe360e39fa71dbf5f7618afaba4b05da804981e
|
||||
PKG_SOURCE_VERSION:=1961395cbf654305f0e08121d7119411913708cc
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user