mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-24 19:14:05 +08:00
Compare commits
62 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c808aeec3 | ||
|
|
1b255c5aa7 | ||
|
|
d061bb78ba | ||
|
|
af87a3305f | ||
|
|
b7eeed044f | ||
|
|
e8cf33b544 | ||
|
|
fb983f5dbc | ||
|
|
676e40a0cc | ||
|
|
215274ef98 | ||
|
|
02ca863b23 | ||
|
|
6f86f000b1 | ||
|
|
8506eed1e4 | ||
|
|
53b3f486bd | ||
|
|
e31e5f32da | ||
|
|
26c2dae0c9 | ||
|
|
2f2d88f770 | ||
|
|
540b09e26b | ||
|
|
001c25ee12 | ||
|
|
d30348fb43 | ||
|
|
636648a34f | ||
|
|
5dc5355632 | ||
|
|
76f2740a29 | ||
|
|
7a6dc0eb84 | ||
|
|
5f75567e4b | ||
|
|
42a8a0c073 | ||
|
|
c40ed94c31 | ||
|
|
783880f6e8 | ||
|
|
35b77f688d | ||
|
|
d32c9061ef | ||
|
|
38b76deb5e | ||
|
|
d62d6167cb | ||
|
|
df6596d7d5 | ||
|
|
799c1c5aa3 | ||
|
|
97d0f55d16 | ||
|
|
cd8af291b1 | ||
|
|
6526877731 | ||
|
|
05eb2b020d | ||
|
|
6a6d30cd77 | ||
|
|
ef8f558dd4 | ||
|
|
f93d57d7f9 | ||
|
|
9fec27da40 | ||
|
|
a64ff3c8a7 | ||
|
|
0c178377f6 | ||
|
|
28825b6078 | ||
|
|
991927899d | ||
|
|
541715b927 | ||
|
|
54df72b3cc | ||
|
|
1570a91c9c | ||
|
|
509d9dfca8 | ||
|
|
bd6352dfcb | ||
|
|
0d9c49ac5e | ||
|
|
8b0263ed90 | ||
|
|
05490cbfc2 | ||
|
|
ac773f5bc3 | ||
|
|
6e64075198 | ||
|
|
8b211d1fa9 | ||
|
|
a224f4ccd8 | ||
|
|
8bd23fa7e1 | ||
|
|
3252f728d8 | ||
|
|
c11422844c | ||
|
|
1193886cef | ||
|
|
cebc3f53e5 |
@@ -1,4 +1,4 @@
|
||||
|
||||
config service 'catv'
|
||||
option enable 'no'
|
||||
option enable '0'
|
||||
option filter '3'
|
||||
|
||||
@@ -19,14 +19,14 @@ export PLATFORM_INCLUDE:=platforms/iopsys/build.mk
|
||||
|
||||
export DATE:=$(shell date +%Y-%m-%d-%H-%M-%S)
|
||||
export LOGIN:=$(shell whoami)
|
||||
BASE_PKG_VERSION:=5.0.0
|
||||
PKG_RELEASE:=RC7
|
||||
BASE_PKG_VERSION:=5.0.1
|
||||
PKG_RELEASE:=RC1
|
||||
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
|
||||
export PKG_VERSION
|
||||
|
||||
###########################--RELEASE--################################
|
||||
|
||||
PKG_SOURCE_VERSION:=11a77f1e9ccc0d591ca69aeab9663e9ec4727b08
|
||||
PKG_SOURCE_VERSION:=a2635dd11c477d70728ab6cbe5c2dee3965dbe14
|
||||
ifeq ($(CONFIG_ICE_OPEN),y)
|
||||
TARGET_PROFILE=$(shell echo $(CONFIG_TARGET_BOARD) | sed s/\"//g)
|
||||
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
|
||||
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 add_list passwords.ice._access_r=root
|
||||
uci -q commit passwords
|
||||
}
|
||||
|
||||
uci -q delete passwords.ice
|
||||
uci -q set passwords.ice=usertype
|
||||
uci -q set passwords.ice.password="\$WPAKEY"
|
||||
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
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=3.0-2017-09-28
|
||||
PKG_VERSION:=3.0-2017-11-24
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=fd932429d3a656fccabcda934932d008dae6e526
|
||||
PKG_SOURCE_VERSION:=d74b88913f676ebf9a210c4674555d080e57ff52
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
@@ -66,6 +66,10 @@ define Build/Prepare
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TARGET_IBOARDID),"EX400")
|
||||
TARGET_CFLAGS += -DEX400
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE -D_AADJ
|
||||
|
||||
|
||||
36
ifbt/Makefile
Normal file
36
ifbt/Makefile
Normal file
@@ -0,0 +1,36 @@
|
||||
#
|
||||
# Copyright (C) 2013 Inteno
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ifbt
|
||||
PKG_VERSION:=0.1
|
||||
|
||||
PKG_SOURCE_VERSION:=da97d6668d3c0e3f2be226c66b406e90179ada81
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git@private.inteno.se:ifbt.git
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ifbt
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
|
||||
TITLE:=Fast BSS Transition
|
||||
endef
|
||||
|
||||
define Package/ifbt/description
|
||||
ifbt is Iopsys application for fast BSS transition
|
||||
endef
|
||||
|
||||
define Package/ifbt/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ifbt $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ifbt))
|
||||
@@ -181,6 +181,8 @@ populate_netmodes() {
|
||||
|
||||
switch_netmode() {
|
||||
[ -f /etc/config/netmode -a -d $modedir ] || return
|
||||
|
||||
local netreload="$1"
|
||||
local curmode conf repeaterready old_mode
|
||||
|
||||
config_load netmode
|
||||
@@ -237,7 +239,12 @@ switch_netmode() {
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
;;
|
||||
repeater*)
|
||||
[ -f /etc/init.d/omcproxy ] && /etc/init.d/omcproxy stop
|
||||
if [ -f /etc/init.d/omcproxy ]; then
|
||||
/etc/init.d/omcproxy stop
|
||||
fi
|
||||
if [ "$netreload" != "0" ]; then
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
@@ -298,7 +305,7 @@ start_service() {
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
switch_netmode
|
||||
switch_netmode "$1"
|
||||
|
||||
# set default JUCI page to overview
|
||||
uci -q set juci.juci.homepage="overview"
|
||||
|
||||
10
inteno-netmodes/files/etc/netmodes/routed_mtk/omcproxy
Normal file
10
inteno-netmodes/files/etc/netmodes/routed_mtk/omcproxy
Normal file
@@ -0,0 +1,10 @@
|
||||
config proxy
|
||||
option scope global
|
||||
option uplink wan
|
||||
list downlink lan
|
||||
|
||||
config proxy
|
||||
option scope global
|
||||
option uplink wan6
|
||||
list downlink lan
|
||||
|
||||
@@ -15,7 +15,6 @@ get_if_creds() {
|
||||
config_get key $section key
|
||||
config_get encryption $section encryption
|
||||
config_get disabled $section disabled 0
|
||||
echo "disabled for $band = $disabled" >>/tmp/dbg
|
||||
[ $disabled -eq 1 ] && return
|
||||
[ "$ssid" == "" -o "$band" == "" ] && return
|
||||
json_add_object
|
||||
|
||||
@@ -95,6 +95,7 @@ CONFIG_PACKAGE_libdaemon=y
|
||||
CONFIG_PACKAGE_libffmpeg-mini=y
|
||||
CONFIG_PACKAGE_libgmp=y
|
||||
CONFIG_PACKAGE_libreadline=y
|
||||
CONFIG_PACKAGE_loop-detector=m
|
||||
CONFIG_PACKAGE_minidlna=y
|
||||
CONFIG_PACKAGE_miniupnpd=y
|
||||
CONFIG_PACKAGE_mtd-utils=y
|
||||
|
||||
@@ -6,15 +6,12 @@ function extract_core {
|
||||
topdir=$(pwd)
|
||||
|
||||
# Paths to packages that should be exported.
|
||||
paths+='package/network/services/samba36 '
|
||||
paths+='package/network/services/base-files '
|
||||
paths+='package/network/services/dnsmasq '
|
||||
paths+='package/network/services/dropbear '
|
||||
paths+='package/network/services/odhcpd '
|
||||
paths+='package/network/config/firewall '
|
||||
paths+='package/network/config/netifd '
|
||||
paths+='package/network/config/qos-scripts '
|
||||
paths+='package/network/utils/iproute2 '
|
||||
paths+='package/network/utils/curl '
|
||||
paths+='package/system/procd '
|
||||
paths+='package/utils/busybox '
|
||||
|
||||
function print_usage {
|
||||
|
||||
@@ -35,8 +35,7 @@ function feeds_update {
|
||||
./scripts/feeds install -p feed_inteno_targets iopsys-brcm63xx-mips
|
||||
./scripts/feeds install -p feed_inteno_targets iopsys-brcm63xx-arm
|
||||
./scripts/feeds install -p feed_inteno_targets iopsys-ramips
|
||||
./scripts/feeds install -p feed_inteno_targets iopsys-realtek
|
||||
|
||||
|
||||
# install all packages
|
||||
./scripts/feeds install -a
|
||||
|
||||
|
||||
@@ -14,10 +14,9 @@ function genconfig {
|
||||
export DEVELOPER=0
|
||||
LOCAL_MIRROR="http://mirror.inteno.se/mirror"
|
||||
|
||||
iopsys_brcm63xx_mips="cg300 cg301 dg150 dg150v2 dg150alv2 dg200 dg200al dg301 dg301al eg300 vg50 vox25"
|
||||
iopsys_brcm63xx_mips="cg300 cg301 dg150 dg150v2 dg150alv2 dg200 dg200al dg301 dg301al eg300 vg50 vox25 hpc_hu02"
|
||||
iopsys_brcm63xx_arm="dg400 eg400 f104w f104 dg400prime dg400primeb 963138REF_P502"
|
||||
iopsys_ramips="ex400"
|
||||
iopsys_realtek="rtl8685g"
|
||||
ramips="mt7621"
|
||||
target="bogus"
|
||||
masterconfig=1
|
||||
@@ -47,13 +46,6 @@ function genconfig {
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_realtek; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_realtek"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $ramips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="ramips"
|
||||
@@ -201,9 +193,18 @@ function genconfig {
|
||||
if [ $target == "bogus" ]; then
|
||||
echo "Hardware profile does not exist"
|
||||
exit 1
|
||||
elif [ -n "$CUSTOMER" -a ! -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/" ]; then
|
||||
echo "Customer profile does not exist"
|
||||
exit 1
|
||||
elif [ -n "$CUSTOMER" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
# Generate base config
|
||||
|
||||
@@ -102,6 +102,10 @@ start_service() {
|
||||
xdslctl start --up --mod $GDmt$Glite$T1413$ADSL2$AnnexL$ADSL2plus$AnnexM --sra $sra --bitswap $bitswap
|
||||
fi
|
||||
|
||||
if [ "$GFast" == "f" ]; then
|
||||
# enable V43 tone set for GFAST
|
||||
xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x400000 0x400000
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
48
loop-detector/Makefile
Normal file
48
loop-detector/Makefile
Normal file
@@ -0,0 +1,48 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=loop-detector
|
||||
PKG_VERSION:=1.0
|
||||
|
||||
PKG_SOURCE_VERSION:=d0fb770eacd6691b98df138b60f5116e02f71a9b
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/loop-detector
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
||||
define Package/loop-detector
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=L2 Loop detector
|
||||
DEPENDS:= +libpcap +libuci +libpthread
|
||||
endef
|
||||
|
||||
define Package/loop-detector/description
|
||||
L2 Loop detection package
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
TARGET_LDFLAGS += \
|
||||
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--with-uci-include-path=$(STAGING_DIR)/usr/include \
|
||||
--with-libubox-include-path=$(STAGING_DIR)/usr/include \
|
||||
--with-libubus-include-path=$(STAGING_DIR)/usr/include
|
||||
|
||||
define Package/loop-detector/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/loop-detector $(1)/sbin/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(CP) ./files/loop_detection.init $(1)/etc/init.d/loop_detection
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(CP) ./files/loop_detection.config $(1)/etc/config/loop_detection
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,loop-detector))
|
||||
5
loop-detector/files/loop_detection.config
Normal file
5
loop-detector/files/loop_detection.config
Normal file
@@ -0,0 +1,5 @@
|
||||
config loop-detect loop
|
||||
option enabled '1'
|
||||
option discovery_interval '10'
|
||||
option recovery_check_tries '5'
|
||||
|
||||
36
loop-detector/files/loop_detection.init
Executable file
36
loop-detector/files/loop_detection.init
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=21
|
||||
STOP=89
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=loop-detector
|
||||
|
||||
start_service() {
|
||||
local enabled
|
||||
|
||||
config_load loop_detection
|
||||
config_get_bool enabled loop enabled 1
|
||||
|
||||
if [ $enabled -eq 1 ]; then
|
||||
procd_open_instance
|
||||
procd_set_param command "/sbin/loop-detector"
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
service_stop /sbin/loop-detector
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger loop_detection
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ PKG_NAME:=mtk-bndstrg
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=e5264d8da2a6de30c2e4e100dfee4dc5db0b59d0
|
||||
PKG_SOURCE_VERSION:=a67f5ccdf9bc6810f15f1ece9edaad5e89cad0f7
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/mtk-bndstrg
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ PKG_NAME:=peripheral_manager
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=ece02822d74c2d9e4be4ebd3ebef4e4a3f57e05d
|
||||
PKG_SOURCE_VERSION:=959eca8ab2b50eaccfff9c710cffe5b317bb6ad1
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se/peripheral_manager
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=questd
|
||||
PKG_VERSION:=3.1.38
|
||||
PKG_VERSION:=3.1.40
|
||||
|
||||
PKG_SOURCE_VERSION:=f2ffd68750343bf3fb796926691ffaad87f9f382
|
||||
PKG_SOURCE_VERSION:=b2794295fdf9469b6cd8ba1544f291d4b83a7d5a
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/questd
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ start_service() {
|
||||
}
|
||||
|
||||
stop() {
|
||||
service_stop /sbin/questd
|
||||
service_stop /sbin/graphd
|
||||
#stop_service() is called after procd killed the service
|
||||
echo ;
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
# 1. sleep for $SLEEP_LONG seconds
|
||||
# 2. run the check_* functions
|
||||
@@ -22,7 +23,7 @@ NPROC_COUNT=4 # number of time that the NPROC_LIMIT has to be hit to trigger a p
|
||||
NPROC_NFAIL=0 # current consecutive Number of FAILures. process restarts when NPROC_NFAIL == NPROC_COUNT
|
||||
|
||||
# memmory limit
|
||||
MEM_LIMIT=15000
|
||||
MEM_LIMIT=20000
|
||||
MEM_COUNT=4
|
||||
MEM_NFAIL=0
|
||||
|
||||
@@ -31,6 +32,9 @@ PCPU_LIMIT=38
|
||||
PCPU_COUNT=4
|
||||
PCPU_NFAIL=0
|
||||
|
||||
# network call check
|
||||
NNET_NFAIL=0
|
||||
|
||||
UBUS_TIMEOUT=5
|
||||
|
||||
|
||||
@@ -39,7 +43,7 @@ ACSDBIN=$(which acsd)
|
||||
|
||||
restart_questd()
|
||||
{
|
||||
logger -s -t $0[$$] "Restarting questd. $NPROC_NFAIL $MEM_NFAIL $PCPU_NFAIL"
|
||||
logger -s -t $0[$$] "Restarting questd. $NPROC_NFAIL $MEM_NFAIL $PCPU_NFAIL $NNET_NFAIL"
|
||||
|
||||
killall -q -KILL questd
|
||||
/etc/init.d/quest stop
|
||||
@@ -49,6 +53,7 @@ restart_questd()
|
||||
NPROC_NFAIL=0
|
||||
MEM_NFAIL=0
|
||||
PCPU_NFAIL=0
|
||||
NNET_NFAIL=0
|
||||
}
|
||||
|
||||
|
||||
@@ -110,21 +115,38 @@ check_pcpu()
|
||||
|
||||
check_ubuscall()
|
||||
{
|
||||
local rv
|
||||
local rv
|
||||
|
||||
ubus -t $UBUS_TIMEOUT call router.system info >/dev/null 2>&1
|
||||
rv=$?
|
||||
ubus -t $UBUS_TIMEOUT call router.system info >/dev/null 2>&1
|
||||
rv=$?
|
||||
|
||||
[ "$rv" = "0" ] && return 0
|
||||
return 1
|
||||
[ "$rv" = "0" ] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
check_ubus_network_call() {
|
||||
[ "$(uci -q get network.lan)" == "interface" ] || return 0
|
||||
json_load "$(ifstatus lan)" || return 0
|
||||
json_get_var up up
|
||||
[ $up -eq 1 ] || return 0
|
||||
local ifname="$(uci -q get network.lan.ifname)"
|
||||
[ -z "$ifname" -o "${ifname:0:3}" == "br-" ] && return 0
|
||||
ubus -t 5 call router.network ports '{"network":"lan"}' | grep -q statistics || {
|
||||
NNET_NFAIL=1
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
restart_bsd()
|
||||
{
|
||||
logger -s -t $0[$$] "Restarting bsd."
|
||||
killall -q -KILL bsd
|
||||
bsd
|
||||
logger -s -t $0[$$] "Restarting WiFi and Band Steering daemon due to bsd hangup."
|
||||
killall -q -15 bsd 2>/dev/null
|
||||
wlctl -i wl0 down 2>/dev/null
|
||||
wlctl -i wl1 down 2>/dev/null
|
||||
wlctl -i wl0 up 2>/dev/null
|
||||
wlctl -i wl1 up 2>/dev/null
|
||||
bsd &
|
||||
}
|
||||
|
||||
check_bsdcall()
|
||||
@@ -141,9 +163,13 @@ check_bsdcall()
|
||||
|
||||
restart_acsd()
|
||||
{
|
||||
logger -s -t $0[$$] "Restarting acsd."
|
||||
killall -q -KILL acsd
|
||||
acsd &
|
||||
logger -s -t $0[$$] "Restarting WiFi and Auto Channel Selection daemon due to acsd high CPU usage."
|
||||
killall -q -9 acsd 2>/dev/null
|
||||
wlctl -i wl0 down 2>/dev/null
|
||||
wlctl -i wl1 down 2>/dev/null
|
||||
wlctl -i wl0 up 2>/dev/null
|
||||
wlctl -i wl1 up 2>/dev/null
|
||||
acsd
|
||||
}
|
||||
|
||||
check_acsd()
|
||||
@@ -155,7 +181,7 @@ check_acsd()
|
||||
|
||||
for p in $pcpu; do
|
||||
p=${p%%%*}
|
||||
if [ "$p" -ge "20" ]; then
|
||||
if [ "$p" -ge "40" ]; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
@@ -193,8 +219,11 @@ main()
|
||||
"$restart_mem" = "1" -o \
|
||||
"$restart_pcpu" = "1" ]
|
||||
then
|
||||
# check_ubuscall || restart_questd
|
||||
restart_questd
|
||||
else
|
||||
if [ "$sample" -ge "$SAMPLES" ]; then
|
||||
check_ubus_network_call || restart_questd
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$BSDBIN" ] ; then
|
||||
|
||||
@@ -55,11 +55,14 @@ define Package/samba2-client
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += $(FPIC)
|
||||
WERR := -Werror=format-security
|
||||
TARGET_CFLAGS_WITHOUT_WERR := $(filter-out $(WERR),$(TARGET_CFLAGS))
|
||||
|
||||
define Build/Compile
|
||||
rm -rf $(PKG_INSTALL_DIR)
|
||||
mkdir -p $(PKG_INSTALL_DIR)
|
||||
(cd $(PKG_BUILD_DIR)/source ; rm -rf config.{cache,status} ; \
|
||||
CFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE" \
|
||||
./configure \
|
||||
$(HOST_CONFIGURE_VARS) \
|
||||
$(HOST_CONFIGURE_ARGS) \
|
||||
@@ -93,7 +96,7 @@ define Build/Compile
|
||||
clean
|
||||
(cd $(PKG_BUILD_DIR)/source; rm -rf config.{cache,status}; \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \
|
||||
CFLAGS="$(TARGET_CFLAGS_WITHOUT_WERR) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288" \
|
||||
CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS) $(LIBGCC_S)" \
|
||||
ac_cv_lib_cups_httpConnect=no \
|
||||
|
||||
40
samba3/patches/520-fix_samba3_compilation_error
Normal file
40
samba3/patches/520-fix_samba3_compilation_error
Normal file
@@ -0,0 +1,40 @@
|
||||
--- a/source/utils/owrt_smbpasswd.c 2017-10-03 15:57:24.190827000 +0100
|
||||
+++ a/source/utils/owrt_smbpasswd.c 2017-10-03 16:07:54.862857000 +0100
|
||||
@@ -108,7 +108,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- fprintf(fp, line);
|
||||
+ fprintf(fp, "%s", line);
|
||||
|
||||
out:
|
||||
if(fp)
|
||||
@@ -134,20 +134,20 @@
|
||||
p = strchr(t, ':');
|
||||
if(p && (p - t == strlen(user)) && (strncmp(t, user, strlen(user))) == 0)
|
||||
{
|
||||
- fpos_t r_pos, w_pos;
|
||||
+ long int r_pos, w_pos;
|
||||
char t2[256];
|
||||
- fgetpos(fp, &r_pos);
|
||||
+ r_pos = ftell(fp);
|
||||
w_pos = r_pos;
|
||||
- w_pos.__pos -= strlen(t);
|
||||
+ w_pos -= strlen(t);
|
||||
while(fgets(t2, 256, fp))
|
||||
{
|
||||
- fsetpos(fp, &w_pos);
|
||||
+ fseek(fp, w_pos, SEEK_SET);
|
||||
fputs(t2, fp);
|
||||
- r_pos.__pos += strlen(t2);
|
||||
- w_pos.__pos += strlen(t2);
|
||||
- fsetpos(fp, &r_pos);
|
||||
+ r_pos += strlen(t2);
|
||||
+ w_pos += strlen(t2);
|
||||
+ fseek(fp, r_pos, SEEK_SET);
|
||||
}
|
||||
- ftruncate(fileno(fp), w_pos.__pos);
|
||||
+ ftruncate(fileno(fp), w_pos);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,5 @@
|
||||
config testserver '1'
|
||||
option server 'tptest.bredband.net'
|
||||
option port '1640'
|
||||
|
||||
config testserver '2'
|
||||
config testserver '1'
|
||||
option server 'referens.sth.ip-performance.se'
|
||||
option port '1642'
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ define Package/voice-client
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=voice-client
|
||||
DEPENDS:=+asterisk18-mod
|
||||
DEPENDS:=asterisk13||asterisk18-mod
|
||||
endef
|
||||
|
||||
define Package/voice-client/description
|
||||
|
||||
@@ -68,6 +68,7 @@ TMPL_ASTERISK=$TEMPLATEDIR/asterisk.conf.TEMPLATE
|
||||
TMPL_CDR=$TEMPLATEDIR/cdr.conf.TEMPLATE
|
||||
TMPL_CDR_SYSLOG=$TEMPLATEDIR/cdr_syslog.conf.TEMPLATE
|
||||
TMPL_INDICATIONS=$TEMPLATEDIR/indications.conf.TEMPLATE
|
||||
TMPL_CEL=$TEMPLATEDIR/cel.conf.TEMPLATE
|
||||
TMPL_LOGGER=$TEMPLATEDIR/logger.conf.TEMPLATE
|
||||
TMPL_MANAGER=$TEMPLATEDIR/manager.conf.TEMPLATE
|
||||
TMPL_MODULES=$TEMPLATEDIR/modules.conf.TEMPLATE
|
||||
@@ -80,7 +81,7 @@ TMPL_BRCM_LINE=$TEMPLATEDIR/brcm_line.TEMPLATE
|
||||
|
||||
TMPL_MEETME=$TEMPLATEDIR/meetme.conf.TEMPLATE
|
||||
|
||||
SPECRATEDIR=$ASTERISKDIR/special_rate_nr.cfg
|
||||
SPECRATECFG=$ASTERISKDIR/special_rate_nr.cfg
|
||||
|
||||
run_hook()
|
||||
{
|
||||
@@ -97,13 +98,13 @@ escape_sed_substitution()
|
||||
# Gets rid of any config files from $ASTERISKDIR not found in $WORKDIR.
|
||||
clean_up_asterisk_config_dir()
|
||||
{
|
||||
for f in $ASTERISKDIR/* ; do
|
||||
basef="`basename $f`"
|
||||
if [ ! -e "$WORKDIR/$basef" ] ; then
|
||||
rm -rf "$f"
|
||||
for f in $ASTERISKDIR/* ; do
|
||||
basef="`basename $f`"
|
||||
if [ ! -e "$WORKDIR/$basef" ] ; then
|
||||
rm -rf "$f"
|
||||
echo "$f" >> /tmp/voice.log
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Compares md5sums of the config files in $WORKDIR to those
|
||||
@@ -113,7 +114,7 @@ compare_configs_and_copy_changed()
|
||||
{
|
||||
# First, compute md5sums of the config files in $WORKDIR.
|
||||
cd $WORKDIR/
|
||||
md5sum * > $MD5SUMSFILE
|
||||
md5sum * > $MD5SUMSFILE 2>/dev/null
|
||||
|
||||
# Now, check the files in $ASTERISKDIR against the md5sums.
|
||||
cd $ASTERISKDIR/
|
||||
@@ -141,15 +142,15 @@ assemble_and_copy_config()
|
||||
# start if a config item is missing and an included config file isn't created.
|
||||
|
||||
# Copy the template files which we don't edit.
|
||||
cp $TMPL_ASTERISK $WORKDIR/asterisk.conf
|
||||
cp $TMPL_CDR $WORKDIR/cdr.conf
|
||||
cp $TMPL_CEL $WORKDIR/cel.conf
|
||||
cp $TMPL_INDICATIONS $WORKDIR/indications.conf
|
||||
cp $TMPL_MANAGER $WORKDIR/manager.conf
|
||||
cp $TMPL_MODULES $WORKDIR/modules.conf
|
||||
cp $TMPL_EXTENSIONS_MACRO $WORKDIR/extensions_macro.conf
|
||||
cp $TMPL_MUSICONHOLD $WORKDIR/musiconhold.conf
|
||||
cp $SPECRATEDIR $WORKDIR/special_rate_nr.cfg
|
||||
[ -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
|
||||
[ -f $TMPL_MUSICONHOLD ] && cp $TMPL_MUSICONHOLD $WORKDIR/musiconhold.conf
|
||||
[ -f $SPECRATECFG ] && cp $SPECRATECFG $WORKDIR/special_rate_nr.cfg
|
||||
|
||||
test -e $TMPL_MEETME && cp $TMPL_MEETME $WORKDIR/meetme.conf
|
||||
|
||||
@@ -178,7 +179,7 @@ assemble_and_copy_config()
|
||||
mv $WORKDIR/features.tmp $WORKDIR/features.conf
|
||||
mv $WORKDIR/voicemail.tmp $WORKDIR/voicemail.conf
|
||||
mv $WORKDIR/meetme.tmp $WORKDIR/meetme.conf
|
||||
mv $WORKDIR/logger.tmp $WORKDIR/logger.conf
|
||||
mv $WORKDIR/logger.tmp $WORKDIR/logger.conf
|
||||
mv $WORKDIR/queues.tmp $WORKDIR/queues.conf
|
||||
mv $WORKDIR/dnsmgr.tmp $WORKDIR/dnsmgr.conf
|
||||
|
||||
@@ -467,13 +468,13 @@ configure_sip()
|
||||
if [ -z "$registertimeoutbackoff" ] ; then
|
||||
sed -i "s/registertimeoutbackoff=|REGISTERTIMEOUTBACKOFF|/;registertimeoutbackoff=/g" $WORKDIR/sip.tmp
|
||||
else
|
||||
sed -i "s/|REGISTERTIMEOUTBACKOFF|/$registertimeoutbackoff/g" $WORKDIR/sip.tmp
|
||||
sed -i "s/|REGISTERTIMEOUTBACKOFF|/$registertimeoutbackoff/g" $WORKDIR/sip.tmp
|
||||
fi
|
||||
|
||||
if [ -z "$registerattemptsbackoff" ] ; then
|
||||
sed -i "s/registerattemptsbackoff=|REGISTERATTEMPTSBACKOFF|/;registerattemptsbackoff=/g" $WORKDIR/sip.tmp
|
||||
else
|
||||
sed -i "s/|REGISTERATTEMPTSBACKOFF|/$registerattemptsbackoff/g" $WORKDIR/sip.tmp
|
||||
sed -i "s/|REGISTERATTEMPTSBACKOFF|/$registerattemptsbackoff/g" $WORKDIR/sip.tmp
|
||||
fi
|
||||
|
||||
if [ -z "$register403timeout" ] ; then
|
||||
@@ -542,7 +543,7 @@ configure_sip()
|
||||
for section in ${CONFIG_SECTIONS}; do
|
||||
local transport
|
||||
config_get cfgtype "$section" TYPE
|
||||
[ -n "$type" -a "x$cfgtype" != "x$type" ] && continue
|
||||
[ -n "$type" -a "x$cfgtype" != "x$type" ] && continue
|
||||
config_get transport $section transport
|
||||
if [ "$transport" == "tls" ] ; then
|
||||
tlsenable="yes"
|
||||
@@ -804,7 +805,7 @@ configure_sip_provider()
|
||||
fi
|
||||
sed -i "s/|AUTOFRAMING|/$autoframing/" $WORKDIR/sip_provider.tmp
|
||||
|
||||
# Set registered extension so that incoming calls match the correct peer
|
||||
# Set registered extension so that incoming calls match the correct peer
|
||||
sed -i "s/|CONTACT_USER|/$user/g" $WORKDIR/sip_provider.tmp
|
||||
|
||||
# Add SIP Provider configuration to the temp file containing all SIP Provider configs.
|
||||
@@ -1035,7 +1036,7 @@ configure_queue()
|
||||
echo "[macro-$1]" >> $WORKDIR/macros.tmp
|
||||
echo "exten => s,1,Answer()" >> $WORKDIR/macros.tmp
|
||||
|
||||
# Workaround to fix no ringback issue for incoming SIP calls
|
||||
# Workaround to fix no ringback issue for incoming SIP calls
|
||||
echo "exten => s,n,Playback(silence/1)" >> $WORKDIR/macros.tmp
|
||||
|
||||
echo "exten => s,n,Queue($1,R)" >> $WORKDIR/macros.tmp
|
||||
@@ -1127,13 +1128,13 @@ configure_cdr()
|
||||
|
||||
echo "cdr_syslog: $cdr_syslog"
|
||||
|
||||
if [ -z "$cdr_syslog" ] ; then
|
||||
if [ -z "$cdr_syslog" ] ; then
|
||||
cdr_syslog='0'
|
||||
fi
|
||||
|
||||
# Enable/disable CDR logging in syslog
|
||||
if [ "$cdr_syslog" == "1" ] ; then
|
||||
cp $TMPL_CDR_SYSLOG $WORKDIR/cdr_syslog.conf
|
||||
cp $TMPL_CDR_SYSLOG $WORKDIR/cdr_syslog.conf
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1188,27 +1189,28 @@ configure_call_filters()
|
||||
echo "exten => s,n(not-foreign),Set(FOREIGN=0)" >> $WORKDIR/macros.tmp
|
||||
echo "" >> $WORKDIR/macros.tmp
|
||||
|
||||
|
||||
# Get special rate numbers from /etc/asterisk/special_rate_nr.cfg
|
||||
while read line
|
||||
do
|
||||
i=0
|
||||
for v in $(echo $line | tr ";" "\n")
|
||||
if [ -f $SPECRATECFG ]; then
|
||||
while read line
|
||||
do
|
||||
if [ "$i" -eq "0" -a "$v" != "$country" ] ; then
|
||||
continue 2
|
||||
fi
|
||||
if [ "$i" -eq "1" ] ; then
|
||||
srn=$v
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
i=0
|
||||
for v in $(echo $line | tr ";" "\n")
|
||||
do
|
||||
if [ "$i" -eq "0" -a "$v" != "$country" ] ; then
|
||||
continue 2
|
||||
fi
|
||||
if [ "$i" -eq "1" ] ; then
|
||||
srn=$v
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
|
||||
if [ -n "$srn" ] ; then
|
||||
# Special rate numbers found
|
||||
break
|
||||
fi
|
||||
done < "/etc/asterisk/special_rate_nr.cfg"
|
||||
if [ -n "$srn" ] ; then
|
||||
# Special rate numbers found
|
||||
break
|
||||
fi
|
||||
done < $SPECRATECFG
|
||||
fi
|
||||
|
||||
echo "Found special rate numbers: $srn"
|
||||
|
||||
@@ -1327,8 +1329,8 @@ get_call_filter()
|
||||
macro="NoOp()"
|
||||
|
||||
if ! [ "x$direction" != "xincoming" -o "x$direction" != "xoutgoing" ] ; then
|
||||
echo $macro
|
||||
fi
|
||||
echo $macro
|
||||
fi
|
||||
|
||||
local call_filter enabled
|
||||
config_get call_filter $provider call_filter "call_filter0"
|
||||
@@ -1353,20 +1355,20 @@ configure_opening_hours_profile()
|
||||
local section cfgtype
|
||||
[ -z "$CONFIG_SECTIONS" ] && return 0
|
||||
for section in ${CONFIG_SECTIONS}; do
|
||||
config_get cfgtype "$section" TYPE
|
||||
[ -n "timespan" -a "x$cfgtype" != "xtimespan" ] && continue
|
||||
local owner
|
||||
config_get cfgtype "$section" TYPE
|
||||
[ -n "timespan" -a "x$cfgtype" != "xtimespan" ] && continue
|
||||
local owner
|
||||
|
||||
config_get owner $section owner
|
||||
if [ "$owner" == "$1" ] ; then
|
||||
local tr dow dom months
|
||||
config_get tr $section time_range
|
||||
config_get dow $section days_of_week
|
||||
config_get dom $section days_of_month
|
||||
config_get months $section months
|
||||
config_get owner $section owner
|
||||
if [ "$owner" == "$1" ] ; then
|
||||
local tr dow dom months
|
||||
config_get tr $section time_range
|
||||
config_get dow $section days_of_week
|
||||
config_get dom $section days_of_month
|
||||
config_get months $section months
|
||||
|
||||
echo "exten => s,n,GotoIfTime($tr,$dow,$dom,$months,?$label)" >> $WORKDIR/macros.tmp
|
||||
fi
|
||||
echo "exten => s,n,GotoIfTime($tr,$dow,$dom,$months,?$label)" >> $WORKDIR/macros.tmp
|
||||
fi
|
||||
done
|
||||
if [ "$invert" == "0" ] ; then
|
||||
echo "exten => s,n,Goto(closed)" >> $WORKDIR/macros.tmp
|
||||
@@ -1641,7 +1643,7 @@ configure_extensions_provider()
|
||||
local call_ivr call_queue extension
|
||||
echo "exten => $user,n,Set(__TRANSFER_CONTEXT=\${CHANNEL(peername)}-transfer)" >> $tmp
|
||||
|
||||
# replace prefix '+' with '00'
|
||||
# replace prefix '+' with '00'
|
||||
echo "exten => $user,n,GotoIf($[\"\${CALLERID(NUM):0:1}\" = \"+\"]?rewrite:norewrite)" >> $tmp
|
||||
echo "exten => $user,n(rewrite),Set(CALLERID(num)=\"00\${CALLERID(num):1}\"))" >> $tmp
|
||||
echo "exten => $user,n(norewrite),NoOp()">> $tmp
|
||||
@@ -1704,7 +1706,7 @@ configure_brcm_line_extension()
|
||||
echo "Configuring local extension $extension"
|
||||
|
||||
config_get cbbs_enabled "features" cbbs_enabled
|
||||
# load cbbs settings if enabled
|
||||
# load cbbs settings if enabled
|
||||
cbbs_key=""
|
||||
cbbs_maxretry="0"
|
||||
cbbs_retrytime="0"
|
||||
@@ -1721,7 +1723,7 @@ configure_brcm_line_extension()
|
||||
sed -i "s/|LINE|/$line/g" $WORKDIR/extensions_local_line.tmp
|
||||
sed -i "s/|TIMEOUT|/$(get_voicemail_timeout)/g" $WORKDIR/extensions_local_line.tmp
|
||||
|
||||
#cbbs settings
|
||||
#cbbs settings
|
||||
sed -i "s/|CBBS_KEY|/$(escape_sed_substitution $cbbs_key)/" $WORKDIR/extensions_local_line.tmp
|
||||
sed -i "s/|MAX_RETRIES|/$cbbs_maxretry/" $WORKDIR/extensions_local_line.tmp
|
||||
sed -i "s/|RETRYTIME|/$cbbs_retrytime/" $WORKDIR/extensions_local_line.tmp
|
||||
@@ -1998,8 +2000,8 @@ configure_conference()
|
||||
echo "exten => $extension,n(enterno),Read(confno,,5)" >> $WORKDIR/extensions_local.tmp
|
||||
|
||||
for section in ${CONFIG_SECTIONS}; do
|
||||
config_get cfgtype "$section" TYPE
|
||||
[ "x$cfgtype" != "xconference_room" ] && continue
|
||||
config_get cfgtype "$section" TYPE
|
||||
[ "x$cfgtype" != "xconference_room" ] && continue
|
||||
|
||||
local name id enabled
|
||||
config_get name $section name
|
||||
@@ -2011,7 +2013,7 @@ configure_conference()
|
||||
echo "Enabling conference room $id"
|
||||
echo "exten => $extension,n,GotoIf($[\"\${confno}\"=\"$id\"]?enterconf)" >> $WORKDIR/extensions_local.tmp
|
||||
echo "conf => $id" >> $WORKDIR/meetme.tmp
|
||||
done
|
||||
done
|
||||
|
||||
echo "exten => $extension,n,Playback(conf-invalid)" >> $WORKDIR/extensions_local.tmp
|
||||
echo "exten => $extension,n,Goto(enterno)" >> $WORKDIR/extensions_local.tmp
|
||||
@@ -2281,11 +2283,13 @@ reload_service() {
|
||||
# if there is a registered account
|
||||
ubus call led.voice1 set '{"state":"off"}'
|
||||
|
||||
asterisk -rx "config reload $ASTERISKDIR/sip.conf"
|
||||
sleep 1
|
||||
asterisk -rx "core reload"
|
||||
asterisk -rx "dialplan reload"
|
||||
asterisk -rx "brcm reload"
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger voice_client
|
||||
procd_add_reload_trigger voice_client
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user