Compare commits

..

2 Commits
3.16 ... 3.13.2

Author SHA1 Message Date
Reidar Cederqvist
9f5683d8c8 10-switch: fix for EG300 wan port ref #13048 2017-10-13 10:36:58 +02:00
Sukru Senli
96fb53be0b questd updated 2017-10-13 10:27:30 +02:00
69 changed files with 338 additions and 859 deletions

View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk18-mod
PKG_VERSION:=1.8.10.1
PKG_SOURCE_VERSION:=d780c4c7a34019b6c673d36338dca9cfb34f3e46
PKG_SOURCE_VERSION:=ee99af0d91a2197529b13075d802ebc37e644e40
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/asterisk-1.8.x
@@ -41,7 +41,7 @@ define Package/asterisk18-mod
$(call Package/asterisk18-mod/Default)
TITLE:=Complete open source PBX, v1.8x
MENU:=1
DEPENDS:= +natalie-dect-h +PACKAGE_bcmkernel:bcmkernel +PACKAGE_bcmopen:bcmopen +libopenssl +libstdcpp +libncurses +libpopt +libpthread +uci +ubus +zlib @!TARGET_avr32
DEPENDS:= +natalie-dect-h +PACKAGE_bcmkernel:bcmkernel +PACKAGE_bcmopen:bcmopen +libopenssl +libncurses +libpopt +libpthread +uci +ubus +zlib @!TARGET_avr32
endef
define Package/asterisk18-mod/description
@@ -451,7 +451,6 @@ define Package/asterisk18-mod/install
done
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/astcanary $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/default
$(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
$(INSTALL_DIR) $(1)/etc/init.d

View File

@@ -5,15 +5,15 @@
config_load voice_client
config_get bindintf SIP bindintf
[ "$INTERFACE" == "$bindintf" -o -z "$bindintf" ] || exit 0
[ "$INTERFACE" == "$bindintf" ] || exit 0
. /lib/functions/network.sh
if [ -n "$bindintf" ]; then
network_get_ipaddr bindaddr "$bindintf"
[ -z "$bindaddr" ] && network_get_ipaddr6 bindaddr "$bindintf"
bindaddr="${bindaddr:-0.0.0.0}"
sed -i "s/bindaddr=.*/bindaddr=$bindaddr/g" /etc/asterisk/sip.conf
[ -e /var/run/asterisk/asterisk.ctl ] && /etc/init.d/asterisk reload
fi
bindaddr="${bindaddr:-0.0.0.0}"
sed -i "s/bindaddr=.*/bindaddr=$bindaddr/g" /etc/asterisk/sip.conf
[ -e /var/run/asterisk/asterisk.ctl ] && /etc/init.d/asterisk reload

View File

@@ -32,7 +32,7 @@ start_service() {
init_asterisk
procd_open_instance
procd_set_param command /usr/bin/taskset 2 "$PROG" -f -p -q
procd_set_param command "$PROG" -f
procd_set_param respawn
procd_close_instance
# service_start /usr/sbin/asterisk

View File

@@ -14,7 +14,7 @@ PKG_RELEASE:=1
PKG_SOURCE_VERSION:=f614cba983d827d5185c60a6a5a35530621d44d2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/mediatek/ated.git
PKG_SOURCE_URL:=http://public.inteno.se:/ated
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

Binary file not shown.

View File

@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
PKG_RELEASE:=1
PKG_VERSION:=1.1.0
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=930b8908a0159cfdef9d5c8861791db176dad7f5
PKG_SOURCE_VERSION:=13da1568d57b8e6732dadc16de828d64c81906b8
PKG_NAME:=dectmngr2

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=endptcfg
PKG_VERSION:=0.3
PKG_VERSION:=0.2
PKG_SOURCE_VERSION:=1194b05278bd0945ca5c76436e56617b86871a65
ifeq ($(CONFIG_ENDPT_OPEN),y)

View File

@@ -5,7 +5,7 @@ PKG_NAME:=gigaset-elements
PKG_VERSION:=2.4.2
# PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_GIGASET_ELEMENTS_SRC_URL ?= git@dev.iopsys.eu:3rdparty/gigaset-elements.git
PKG_GIGASET_ELEMENTS_SRC_URL ?= git@public.inteno.se:gigaset-elements.git
PKG_GIGASET_ELEMENTS_VERSION ?= v$(PKG_VERSION)
PKG_SOURCE_URL:=$(PKG_GIGASET_ELEMENTS_SRC_URL)

View File

@@ -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.3.8
PKG_RELEASE:=
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)-$(DATE)_$(LOGIN)
BASE_PKG_VERSION:=5.0.0
PKG_RELEASE:=RC7
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
export PKG_VERSION
###########################--RELEASE--################################
PKG_SOURCE_VERSION:=5cc855907b9d6a13d36fd619b579fcf3c6f24b5c
PKG_SOURCE_VERSION:=11a77f1e9ccc0d591ca69aeab9663e9ec4727b08
ifeq ($(CONFIG_ICE_OPEN),y)
TARGET_PROFILE=$(shell echo $(CONFIG_TARGET_BOARD) | sed s/\"//g)
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/

View File

@@ -2,14 +2,13 @@
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

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=3.0-2018-03-01
PKG_VERSION:=3.0-2017-09-28
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=af5476c35d03c03f82c22a65cba932f6df096808
PKG_SOURCE_VERSION:=fd932429d3a656fccabcda934932d008dae6e526
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -66,10 +66,6 @@ define Build/Prepare
endef
endif
ifeq ($(CONFIG_TARGET_IBOARDID),"EX400")
TARGET_CFLAGS += -DEX400
endif
TARGET_CFLAGS += \
-D_GNU_SOURCE -D_AADJ

View File

@@ -1,76 +1,44 @@
#!/bin/sh
grep -q "Designated" /etc/banner || exit 0
. /lib/functions/network.sh
[ "$ACTION" == "ifup" ] || exit 0
[ -f /etc/config/cwmp ] || exit 0
local islan="$(uci -q get network.$INTERFACE.is_lan)"
[ "$islan" == "1" ] && exit 0
handle_icwmp_restart() {
[ -f /tmp/switching_mode ] && exit 0
local proto="$(uci -q get network.$INTERFACE.proto)"
[ "$proto" == "none" ] && exit 0
[ "$INTERFACE" == "loopback" ] && exit 0
local ifname="$(uci -q get network.$INTERFACE.ifname)"
[ "${ifname:0:1}" == "@" ] && 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
mkdir -p /tmp/ipv4
local islan="$(uci -q get network.$INTERFACE.is_lan)"
[ "$islan" == "1" ] && exit 0
local previpaddr=""
local curipaddr=""
local ipaddrfile=/tmp/ipv4/$INTERFACE-ipaddr
previpaddr=$(cat $ipaddrfile 2>/dev/null)
network_get_ipaddr curipaddr $INTERFACE
[ -n "$curipaddr" ] && echo $curipaddr > $ipaddrfile || rm -f $ipaddrfile
local proto="$(uci -q get network.$INTERFACE.proto)"
[ "$proto" == "none" ] && exit 0
local prevgateway=""
local curgateway=""
local gatewayfile=/tmp/ipv4/$INTERFACE-gateway
prevgateway=$(cat $gatewayfile 2>/dev/null)
network_get_gateway curgateway $INTERFACE
[ -n "$curgateway" ] && echo $curgateway > $gatewayfile || rm -f $gatewayfile
local ifname="$(uci -q get network.$INTERFACE.ifname)"
[ "${ifname:0:1}" == "@" ] && exit 0
local prevsubnets=""
local cursubnets=""
local subnetsfile=/tmp/ipv4/$INTERFACE-subnets
prevsubnets=$(cat $subnetsfile 2>/dev/null)
network_get_subnets cursubnets $INTERFACE
[ -n "$cursubnets" ] && echo $cursubnets > $subnetsfile || rm -f $subnetsfile
mkdir -p /tmp/ipv4
[ "$previpaddr" = "$curipaddr" -a "$prevgateway" = "$curgateway" -a "$prevsubnets" = "$cursubnets" ] && exit 0
network_flush_cache
[ -f /etc/config/cwmp ] && /etc/init.d/icwmpd reload &
local previpaddr=""
local curipaddr=""
local ipaddrfile=/tmp/ipv4/$INTERFACE-ipaddr
previpaddr=$(cat $ipaddrfile 2>/dev/null)
network_get_ipaddr curipaddr $INTERFACE
[ -n "$curipaddr" ] && echo $curipaddr > $ipaddrfile || rm -f $ipaddrfile
local prevgateway=""
local curgateway=""
local gatewayfile=/tmp/ipv4/$INTERFACE-gateway
prevgateway=$(cat $gatewayfile 2>/dev/null)
network_get_gateway curgateway $INTERFACE
[ -n "$curgateway" ] && echo $curgateway > $gatewayfile || rm -f $gatewayfile
local prevsubnets=""
local cursubnets=""
local subnetsfile=/tmp/ipv4/$INTERFACE-subnets
prevsubnets=$(cat $subnetsfile 2>/dev/null)
network_get_subnets cursubnets $INTERFACE
[ -n "$cursubnets" ] && echo $cursubnets > $subnetsfile || rm -f $subnetsfile
local prevdnsservers=""
local curdnsservers=""
local dnsserverfile=/tmp/ipv4/$INTERFACE-dnsservers
prevdnsservers=$(cat $dnsserverfile 2>/dev/null)
network_get_dnsserver curdnsservers $INTERFACE
[ -n "$curdnsservers" ] && echo $curdnsservers > $dnsserverfile || rm -f $dnsserverfile
local prevdev=""
local curdev=""
local devfile=/tmp/ipv4/$INTERFACE-dev
prevdev=$(cat $devfile 2>/dev/null)
network_get_device curdev $INTERFACE
[ -n "$curdev" ] && echo $curdev > $devfile || rm -f $devfile
[ \
"$prevdev" == "$curdev" -a \
"$previpaddr" = "$curipaddr" -a \
"$prevgateway" = "$curgateway" -a \
"$prevsubnets" = "$cursubnets" -a \
"$prevdnsservers" = "$curdnsservers" \
] && exit 0
/etc/init.d/icwmpd reload &
}
handle_icwmp_restart

View File

@@ -14,7 +14,7 @@ PKG_RELEASE:=1
PKG_SOURCE_VERSION:=92f918d26c0ffc22d1704f5ea6cbb0bd7fdbdab9
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd
PKG_SOURCE_URL:=http://public.inteno.se/inbd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -1,54 +0,0 @@
#!/bin/sh
. /lib/functions.sh
. /lib/functions/network.sh
follow_wan='0'
config_load dhcp
config_get follow_wan 'lan' dhcpv6_follow_wan 0
test $follow_wan = '1' || exit 0
PROTO=""
get_dhcp_version_of_interface() {
config_get PROTO $INTERFACE proto
if [ -n "$PROTO" ]; then
return
fi
}
config_load network
config_foreach get_dhcp_version_of_interface interface
lan_v6_on() {
logger -t lan-follow-wan "turning ON IPv6 on LAN"
uci set dhcp.lan.dhcpv6='server'
}
lan_v6_off() {
logger -t lan-follow-wan "turning OFF IPv6 on LAN"
uci set dhcp.lan.dhcpv6='disabled'
}
case "$ACTION" in
ifup)
if [ "$PROTO" = "dhcpv6" ]; then
network_flush_cache
network_get_ipaddr6 current_ipv6_address $INTERFACE
if [ -n "$current_ipv6_address" ]; then
lan_v6_on
else
lan_v6_off
fi
elif [ "$PROTO" = "dhcp" ]; then
lan_v6_off
fi
uci commit
/etc/init.d/odhcpd restart
;;
esac

View File

@@ -3,9 +3,6 @@
. /lib/functions.sh
include /lib/network
# exit if no wet interface is available
uci show wireless | grep mode | grep -q wet || exit
ps | grep hotplug | grep button && exit
MTK=0
@@ -70,8 +67,6 @@ case "$ACTION" in
uci set network.wan.ifname="$(echo $WANDEV $(uci get network.wan.ifname) | sed 's/$/ /' | sed -r "s/$wetif //g" | tr ' ' '\n' | sort -u | tr '\n' ' ')"
uci commit network
ubus call network reload
sleep 1
ubus call network.device set_state "{\"name\":\"$wetif\", \"defer\":true}"
[ -f /usr/sbin/wlctl ] && wlctl -i $wetif bss down 2>/dev/null
ping -c 1 -w 10 $defroute >/dev/null 2>&1 || killall -USR1 udhcpc
ubus call router.network reload
@@ -94,8 +89,6 @@ case "$ACTION" in
uci set network.wan.ifname="$(echo $wetif $(uci get network.wan.ifname) | sed 's/$/ /' | sed -r "s/$WANDEV //g" | tr ' ' '\n' | sort -u | tr '\n' ' ')"
uci commit network
ubus call network reload
sleep 1
ubus call network.device set_state "{\"name\":\"$WANDEV\", \"defer\":true}"
[ -f /usr/sbin/wlctl ] && wlctl -i $wetif bss up 2>/dev/null
ping -c 1 -w 10 $defroute >/dev/null 2>&1 || {
killall -9 wifi

View File

@@ -181,8 +181,6 @@ populate_netmodes() {
switch_netmode() {
[ -f /etc/config/netmode -a -d $modedir ] || return
local netreload="$1"
local curmode conf repeaterready old_mode
config_load netmode
@@ -239,12 +237,7 @@ switch_netmode() {
ubus call uci commit '{"config":"network"}'
;;
repeater*)
if [ -f /etc/init.d/omcproxy ]; then
/etc/init.d/omcproxy stop
fi
if [ "$netreload" != "0" ]; then
ubus call uci commit '{"config":"network"}'
fi
[ -f /etc/init.d/omcproxy ] && /etc/init.d/omcproxy stop
;;
esac
else
@@ -305,7 +298,7 @@ start_service() {
}
reload_service() {
switch_netmode "$1"
switch_netmode
# set default JUCI page to overview
uci -q set juci.juci.homepage="overview"

View File

@@ -1,16 +0,0 @@
{
"description": [
{ "en" : "Routed, LAN1 bridged" },
{ "sv" : "Routed, LAN1 bryggad" }
],
"explanation": [
{ "en" : "LAN4 port is bridged with internet" },
{ "sv" : "LAN4 port överbryggas med internet" }
],
"excluded_boards" : [
"EX4*"
],
"credentials" : 0
}

View File

@@ -1,31 +0,0 @@
config interface 'loopback'
option is_lan '1'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option is_lan '1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ifname '$LAN2 $LAN3 $LAN4'
option ip6assign '64'
config interface 'wan'
option type 'bridge'
option proto 'dhcp'
option vendorid '$HARDWAREID-INTENO'
option hostname 'Inteno_$MAC4'
option ifname '$WAN.1 $LAN1'
option reqopts '43 66 67 128 132 224 225 226'
config interface 'wan6'
option proto 'dhcpv6'
option ifname '@wan'
option reqaddress 'try'
option reqprefix 'auto'

View File

@@ -16,5 +16,5 @@
],
"uplink_band" : "b",
"credentials" : 1,
"reboot" : 1
"reboot" : 0
}

View File

@@ -77,4 +77,17 @@ config wifi-device 'wl1'
option rifs_advert '0'
option maxassoc '32'
option doth '0'
option apsta '1'
config wifi-iface
option device 'wl1'
option ifname 'wl1'
option network 'wan'
option mode 'wet'
option ssid 'Inteno-$BSSID4'
option encryption 'psk2'
option cipher 'auto'
option wps_pbc '0'
option wmf_bss_enable '1'
option autoconf '1'

View File

@@ -16,5 +16,5 @@
],
"uplink_band" : "b",
"credentials" : 1,
"reboot" : 1
"reboot" : 0
}

View File

@@ -77,6 +77,19 @@ config wifi-device 'wl1'
option rifs_advert '0'
option maxassoc '32'
option doth '0'
option apsta '1'
config wifi-iface
option device 'wl1'
option ifname 'wl1'
option network 'wan'
option mode 'wet'
option ssid 'Inteno-$BSSID4'
option encryption 'psk2'
option cipher 'auto'
option wps_pbc '0'
option wmf_bss_enable '1'
option autoconf '1'
config wifi-iface
option device 'wl1'

View File

@@ -13,5 +13,5 @@
],
"uplink_band" : 'b',
"credentials" : 1,
"reboot" : 1
"reboot" : 0
}

View File

@@ -13,5 +13,5 @@
],
"uplink_band" : 'a',
"credentials" : 1,
"reboot" : 1
"reboot" : 0
}

View File

@@ -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

View File

@@ -29,7 +29,6 @@ is_inteno_macaddr()
-e "^00:0C:43" \
-e "^02:0C:43" \
-e "^06:0C:43" \
-e "^34:E3:80" \
&& return
false
}

View File

@@ -162,14 +162,17 @@ done
repeater_iface_num=$(uci -q show wireless | grep -e ".mode='wet'" -e ".mode='sta'" | sed 's/.*\[\([0-9]\)\].*/\1/')
[ "$repeater_iface_num" ] && {
json_get_var ssid ssid
json_get_var key key
json_get_var encryption encryption
set_wireless_values "$repeater_iface_num" "$ssid" "$key" "$encryption"
[ -z "$repeater_iface_num" ] && {
[ "$from_gui" == "true" ] && restore "back"
exit
}
json_get_var ssid ssid
json_get_var key key
json_get_var encryption encryption
set_wireless_values "$repeater_iface_num" "$ssid" "$key" "$encryption"
json_load "`cat $file`"
json_select "wifi_ifaces"
@@ -223,11 +226,7 @@ while json_get_var dummy $i; do
json_select ..
done
if [ -z $repeater_iface_num ] ; then
i=$((b_num + a_num))
else
i=$((b_num + a_num + 1))
fi
i=$((b_num + a_num + 1))
if [ $repeater_iface_num -gt $i ]; then
i=$((i-1))

View File

@@ -39,6 +39,6 @@ while true; do
fping -c 1 -t 1000 -g $ipaddr/$mask -q >/dev/null 2>&1
fi
sleep 40
sleep 20
done

View File

@@ -15,6 +15,7 @@ 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

View File

@@ -3,7 +3,7 @@ CONFIG_BUSYBOX_CUSTOM=y
CONFIG_CCACHE=y
CONFIG_DEBUG=y
CONFIG_DEVEL=y
# CONFIG_LOCALMIRROR is not set
CONFIG_LOCALMIRROR="http://mirror.inteno.se/mirror"
CONFIG_PACKAGE_6in4=y
CONFIG_PACKAGE_6rd=y
CONFIG_PACKAGE_6to4=y
@@ -72,7 +72,6 @@ CONFIG_PACKAGE_juci-natalie-dect=y
CONFIG_PACKAGE_juci-netmode=y
CONFIG_PACKAGE_juci-network-netifd=y
CONFIG_PACKAGE_juci-owsd=y
CONFIG_PACKAGE_juci-openvpn=y
CONFIG_PACKAGE_juci-printer=y
CONFIG_PACKAGE_juci-realtime-graphs=y
CONFIG_PACKAGE_juci-samba=y
@@ -96,7 +95,6 @@ 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
@@ -112,7 +110,7 @@ CONFIG_PACKAGE_odhcpd=y
CONFIG_PACKAGE_openssl-util=y
CONFIG_PACKAGE_openvpn-easy-rsa=y
CONFIG_PACKAGE_openvpn-openssl=y
# CONFIG_PACKAGE_p910nd is not set
CONFIG_PACKAGE_p910nd=y
CONFIG_PACKAGE_peripheral_manager=y
CONFIG_PACKAGE_port-management=y
CONFIG_PACKAGE_power-management=y
@@ -174,7 +172,6 @@ CONFIG_BUSYBOX_CONFIG_LSMOD=y
CONFIG_BUSYBOX_CONFIG_LSPCI=y
CONFIG_BUSYBOX_CONFIG_LSUSB=y
CONFIG_BUSYBOX_CONFIG_MICROCOM=y
CONFIG_BUSYBOX_CONFIG_MPSTAT=y
CONFIG_BUSYBOX_CONFIG_RMMOD=y
CONFIG_BUSYBOX_CONFIG_STTY=y
CONFIG_BUSYBOX_CONFIG_TFTP=y

View File

@@ -5,14 +5,14 @@
_iop_get_profiles()
{
find feeds/targets/iopsys-*/ -name '*.diff' \
find feeds/feed_inteno_targets/iopsys-*/ -name '*.diff' \
|awk -F'/' '{print$NF}' \
|awk -F. '{print$1}'
}
_iop_get_models()
{
find feeds/targets/iopsys-*/ -mindepth 1 -maxdepth 1 -type d \
find feeds/feed_inteno_targets/iopsys-*/ -mindepth 1 -maxdepth 1 -type d \
|awk -F'/' '{print$NF}' \
|egrep '^(cg|dg|eg|vg|vox)[0-9]'
}
@@ -36,7 +36,7 @@ _iop()
feeds_update genconfig generate_tarballs install_key \
scp_changes setup_host ssh_install_key ssh_sysupgrade \
ssh_sysupgrade_latest ssh_sysupgrade_latest_w status \
update_package update_feed_branches"
update_package"
if [ $COMP_CWORD -eq 1 ] ; then

View File

@@ -6,12 +6,15 @@ function extract_core {
topdir=$(pwd)
# Paths to packages that should be exported.
paths+='package/network/services/base-files '
paths+='package/network/services/samba36 '
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/system/procd '
paths+='package/network/utils/iproute2 '
paths+='package/network/utils/curl '
paths+='package/utils/busybox '
function print_usage {

View File

@@ -28,14 +28,14 @@ function feeds_update {
# replace core packages with iopsys versions
if [ $override == 1 ]; then
./scripts/feeds install -f -p openwrt_cc_core -a
./scripts/feeds install -f -p feed_inteno_openwrt -a
fi
# targets need to be installed explicitly
./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
# install all packages
./scripts/feeds install -a
@@ -54,3 +54,6 @@ function feeds_update {
register_command "feeds_update" "Update feeds to point to commit hashes from feeds.conf"

View File

@@ -7,15 +7,15 @@ function genconfig {
export FILEDIR="files/"
export THEMEDIR="themes"
CURRENT_CONFIG_FILE=".current_config_file"
export CONFIGPATH="package/feeds/iopsys/iop/configs"
export CONFIGPATH="package/feeds/feed_inteno_packages/iop/configs"
CUSTPATH="customerconfigs"
export CUSTCONF="customerconfigs/customers"
export VERBOSE=0
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 hpc_hu02 eg200"
iopsys_brcm63xx_arm="dg400 eg400 sdx_500rg f104w f104 dg400prime dg400primeb 963138REF_P502"
iopsys_brcm63xx_mips="cg300 cg301 dg150 dg150v2 dg150alv2 dg200 dg200al dg301 dg301al eg300 vg50 vox25"
iopsys_brcm63xx_arm="dg400 eg400 f104w f104 dg400prime dg400primeb 963138REF_P502"
iopsys_ramips="ex400"
ramips="mt7621"
target="bogus"
@@ -193,18 +193,9 @@ function genconfig {
if [ $target == "bogus" ]; then
echo "Hardware 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
elif [ -n "$CUSTOMER" -a ! -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/" ]; then
echo "Customer profile does not exist"
exit 1
fi
# Generate base config
@@ -295,7 +286,7 @@ function genconfig {
fi
# Force regeneration of themes
touch package/feeds/juci/juci/Makefile
touch package/feeds/feed_inteno_juci/juci/Makefile
# Force regeneration of kernel Makefile
# Needed to disable kmods for iopsys-brcm targets

View File

@@ -4,7 +4,7 @@
build_bcmkernel_consumer() {
local tarfile bcmkernelcommith sdkversion
sdkversion=$(grep "CONFIG_BRCM_SDK_VER.*=y" .config | awk -F'[_,=]' '{print$5}')
bcmkernelcommith=$(grep -w "PKG_SOURCE_VERSION:" $curdir/feeds/broadcom/bcmkernel/$sdkversion.mk | cut -d'=' -f2)
bcmkernelcommith=$(grep -w "PKG_SOURCE_VERSION:" $curdir/feeds/feed_inteno_broadcom/bcmkernel/$sdkversion.mk | cut -d'=' -f2)
# do not build bcmopen sdk if it was already built before
ssh $SERVER "ls $FPATH/bcmopen-$board-$bcmkernelcommith.tar.gz" && return
cd ./build_dir/target-*_uClibc-0.9.33.*/bcmkernel-3.4-$sdkversion/bcm963xx/release
@@ -20,8 +20,8 @@ build_natalie_consumer() {
# create natalie-dect open version tar file
local natalieversion nataliecommith
grep -q "CONFIG_TARGET_NO_DECT=y" .config && return
natalieversion=$(grep -w "PKG_VERSION:" ./feeds/iopsys/natalie-dect/Makefile | cut -d'=' -f2)
nataliecommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/iopsys/natalie-dect/Makefile | cut -d'=' -f2)
natalieversion=$(grep -w "PKG_VERSION:" ./feeds/feed_inteno_packages/natalie-dect/Makefile | cut -d'=' -f2)
nataliecommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/feed_inteno_packages/natalie-dect/Makefile | cut -d'=' -f2)
ssh $SERVER "ls $FPATH/natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz" && return
cd ./build_dir/target-*_uClibc-0.9.33.*/natalie-dect-$natalieversion/
mkdir natalie-dect-open-$natalieversion
@@ -38,8 +38,8 @@ build_endptcfg_consumer() {
# create endptcfg open version tar file
local endptversion endptcommith
grep -q "CONFIG_TARGET_NO_VOICE=y" .config && return
endptversion=$(grep -w "PKG_VERSION:" ./feeds/iopsys/endptcfg/Makefile | cut -d'=' -f2)
endptcommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/iopsys/endptcfg/Makefile | cut -d'=' -f2)
endptversion=$(grep -w "PKG_VERSION:" ./feeds/feed_inteno_packages/endptcfg/Makefile | cut -d'=' -f2)
endptcommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/feed_inteno_packages/endptcfg/Makefile | cut -d'=' -f2)
ssh $SERVER "ls $FPATH/endptcfg-$profile-$endptversion-$endptcommith.tar.gz" && return
cd ./build_dir/target-*_uClibc-0.9.33.*/endptcfg-$endptversion/
mkdir endptcfg-open-$endptversion
@@ -55,9 +55,9 @@ build_endptcfg_consumer() {
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)
icecommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/feed_inteno_packages/ice-client/Makefile | head -1 | cut -d'=' -f2)
icebasever=$(grep -w "BASE_PKG_VERSION:" ./feeds/feed_inteno_packages/ice-client/Makefile | cut -d'=' -f2)
icerelease=$(grep -w "PKG_RELEASE:" ./feeds/feed_inteno_packages/ice-client/Makefile | cut -d'=' -f2)
iceversion=$icebasever$icerelease
ssh $SERVER "ls $FPATH/ice-client-$target-$iceversion-$icecommith.tar.gz" && return
cd ./build_dir/target-*_uClibc-0.9.33.*/ice-client-$icebasever/ipkg-* || cd ./build_dir/target-mips*musl-*/ice-client-$icebasever/ipkg-*

View File

@@ -1,61 +0,0 @@
#!/bin/sh
# Exported interface
function update_feed_branches {
local release="$1"
local ipath="$(pwd)"
local branch="$2"
local curbranch
[ -n "$release" ] || {
echo "Usage: ./update_feeds <RELEASE> <BRANCH>"
echo ""
echo "If you do not give a branch as argument,"
echo "<RELEASE> branch will be updated to commit"
echo "hash given in feeds.conf for each feed repo"
exit 1
}
if [ -n "$branch" ]; then
echo "Updating release branch $release to specific commit hash given in feeds.conf for each feed repo at branch $branch"
if git diff-index --quiet HEAD; then
curbranch=`git symbolic-ref HEAD 2>/dev/null`
curbranch=${curbranch##refs/heads/}
if [ -z $curbranch ]; then
curbranch=`git log -1 --pretty=format:"%H"`
fi
git checkout $branch || {
echo "couldn't checkout branch $branch"
exit 99
}
else
echo "You have unsaved changes."
exit 99
fi
else
echo "Updating release branch $release to specific commit hash given in feeds.conf for each feed repo"
fi
ifeeds="$(grep -r feed_inteno feeds.conf | awk '{print$2}' | cut -d'_' -f3 | tr '\n' ' ')"
for f in $ifeeds; do
commith=$(grep feed_inteno_$f feeds.conf | cut -d'^' -f2)
cd $ipath/feeds/feed_inteno_$f
git branch -D $release 2>/dev/null
echo "feed_inteno_$f: updating release branch $release to commit $commith"
git checkout $commith
git push origin :$release
git checkout -b $release
git push origin $release
cd $ipath
done
if [ -n "$branch" ]; then
echo "Release branch $release is updated to specific commit hash given in feeds.conf in in branch $branch for each feed repo"
git checkout $curbranch
else
echo "Release branch $release is updated to specific commit hash given in feeds.conf for each feed repo"
fi
}
register_command "update_feed_branches" "<release> [branch] Update branches in feeds from the current top level commit or specified top level branch"

View File

@@ -458,46 +458,33 @@ parse_dhcp_options()
# return 1 if the default gateway is not reachable after $wait_time
wait_for_default_gateway()
{
local gateway device nameservers
local gateway
local device
local wait_time=120
local wait_interval=10
local interface="$1"
while [ true ] ; do
gateway=""
device=""
network_flush_cache
if [ -z "$interface" ]; then
network_find_wan interface
network_get_gateway gateway wan #true
network_get_device device wan
device="${device:+-I }$device"
if ping -q -w 1 -c 1 $device $gateway >/dev/null 2>&1 ; then
[ "$wait_time" -lt "60" ] && v "Default gateway $gateway is reachable"
sleep $wait_interval
return 0
fi
if [ -n "$interface" ]; then
network_get_device device $interface
if [ "$device" ]; then
device="${device:+-I }$device"
network_get_gateway gateway $interface true
# ping gateways to check uplink
if ping -q -w1 -c 1 $device $gateway >/dev/null 2>&1 ; then
[ "$wait_time" -lt "60" ] && v "Default gateway $gateway is reachable"
sleep $wait_interval
return 0
fi
# try the nameservers too
nameservers="$(grep nameserver /var/resolv.conf.auto | awk '{print $2}')"
for ns in $nameservers; do
if ping -q -w 1 -c 1 $device $ns >/dev/null 2>&1 ; then
[ "$wait_time" -lt "60" ] && v "Name server $ns is reachable"
sleep $wait_interval
return 0
fi
done
# try the nameservers too
for ns in $(grep nameserver /var/resolv.conf.auto | awk '{print $2}'); do
if ping -q -w 1 -c 1 $device $ns >/dev/null 2>&1 ; then
[ "$wait_time" -lt "60" ] && v "Name server $ns is reachable"
sleep $wait_interval
return 0
fi
fi
done
v "Waiting for default gateway or name server. Countdown $wait_time seconds"
sleep $wait_interval
@@ -530,17 +517,10 @@ main()
shift;
done
local interface=""
config_load provisioning
config_get interface polling interface
if ! wait_for_default_gateway $interface; then
if ! wait_for_default_gateway ; then
v "Neither default gateway nor name server are reachable. Aborting iup."
exit 1
fi
# reload config to get latest values
config_load provisioning
if [ ! -f $IUPMD5 ]; then
v "Creating file $IUPMD5"
@@ -553,6 +533,7 @@ main()
local software
local sofwareminuspath
config_load provisioning
#check if iup should be used or if its overridden by /etc/config
config_get configurl configserver url
config_get reboot configserver reboot

View File

@@ -90,7 +90,9 @@ start_service() {
xtmctl start
xtmctl operate intf --state 1 enable
vdsl=$(db get hw.board.hasVdsl)
json_load "$(ubus call router.system info)"
json_select specs
json_get_var vdsl vdsl
if [ $vdsl -eq 1 ]; then
echo "xdslctl start --up --mod $GDmt$Glite$T1413$ADSL2$AnnexL$ADSL2plus$AnnexM$VDSL2$GFast --profile \"$a8a $b8b $c8c $d8d $a12a $b12b $a17a $a30a $b35b $BrcmPriv1\" --sra $sra --bitswap $bitswap --us0 $US0"
@@ -100,10 +102,6 @@ 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
}

View File

@@ -55,6 +55,7 @@ addethernet() {
ifname="${ifname:-$baseifname.1}"
brcm_virtual_interface_rules "$baseifname" "$ifname" "$bridge" "$mac2"
}
boot() {
@@ -95,15 +96,12 @@ start_service() {
echo "Setting up Ethernet WAN"
config_load layer2_interface_ethernet
config_foreach addethernet ethernet_interface
/etc/init.d/layer2_interface_vlan start
}
stop_service() {
local ifname
config_load layer2_interface_ethernet
config_foreach removeethernet ethernet_interface
/etc/init.d/layer2_interface_vlan stop
sleep 1
}
reload_service() {
@@ -115,3 +113,4 @@ service_triggers() {
procd_add_reload_trigger layer2_interface_ethernet
}

View File

@@ -91,13 +91,12 @@ wlmngr_doWlConf() {
wlmngr_setupMbssMacAddr() {
local idx=$1
local hwaddr
wlmngr_WlConfDown $idx
for vif in $(nvram get "wl$idx"_vifs); do
hwaddr=$(nvram get "$vif"_hwaddr)
ifconfig $vif hw ether $hwaddr 2>/dev/null
wlctl -i $vif cur_etheraddr $hwaddr 2>/dev/null
done
wlmngr_doWlConf $idx
}
#enableSSD() {
@@ -201,14 +200,14 @@ enableBSD() {
nvram set ${wdev}_bsd_if_select_policy=$wdev_to_steer
nvram set ${wdev}_bsd_sta_select_policy="20 -60 0 0 1 0 0 0 0 0x42"
nvram set ${wdev}_bsd_steer_prefix=$wdev
nvram set ${wdev}_bsd_steering_policy="0 0 0 -60 0 0x0"
nvram set ${wdev}_bsd_steering_policy="0 0 0 -60 0 0x52"
else
# 5G
nvram set ${wdev}_bsd_if_qualify_policy="30 0x0"
nvram set ${wdev}_bsd_if_select_policy=$wdev_to_steer
nvram set ${wdev}_bsd_sta_select_policy="20 $rssi_threshold 0 0 1 0 0 0 0 0x40"
nvram set ${wdev}_bsd_steer_prefix=$wdev
nvram set ${wdev}_bsd_steering_policy="80 5 3 $rssi_threshold 0 0x0"
nvram set ${wdev}_bsd_steering_policy="80 5 3 $rssi_threshold 0 0x40"
fi
else
# Bandwidth Usage based policy #
@@ -349,9 +348,6 @@ wlmngr_doQoS() {
wlmngr_finalize() {
local idx=$1
local dconpoll="$(uci -q get wireless.wl$idx.dconpoll)"
dconpoll=${dconpoll:-0}
wlctl -i wl$idx phy_watchdog 1
wlctl -i wl$idx fcache 1
@@ -360,8 +356,8 @@ wlmngr_finalize() {
local pcid="$(wlctl -i wl$idx revinfo | awk 'FNR == 2 {print}' | cut -d'x' -f2)"
local isac="$(db get hw.$pcid.is_ac)"
if [ "$isac" == "1" ]; then
#wlctl -i wl$idx msglevel +dfs 2>/dev/null
dhdctl -i wl$idx dconpoll $dconpoll 2>/dev/null
wlctl -i wl$idx msglevel +radar +dfs 2>/dev/null
dhdctl -i wl$idx dconpoll 200 2>/dev/null
fi
local rdrthrs="$(db get hw.$pcid.radarthrs)"
if [ -n "$rdrthrs" ]; then
@@ -372,19 +368,6 @@ wlmngr_finalize() {
# this piece of code is -required- to make br-lan's mac work properly
# in all cases
sendarp -s br-lan -d br-lan
# set power percent
local pwrpercent="$(uci -q get wireless.wl$idx.txpower)"
pwrpercent=${pwrpercent:-100}
wlctl -i wl$idx pwr_percent $pwrpercent
# set message level
wlctl -i wl$idx msglevel 0x0 2>/dev/null
dhdctl -i wl$idx msglevel 0x0 2>/dev/null
for msg in $(uci -q get wireless.wl$idx.msglevel); do
wlctl -i wl$idx msglevel +$msg 2>/dev/null
dhdctl -i wl$idx msglevel +$msg 2>/dev/null
done
}
wlmngr_issueServiceCmd() {

View File

@@ -58,45 +58,17 @@ ifbaseexists()
return 0
}
get_bridge_of() {
find_network() {
local config="$1"
local iface="$2"
local net=
local if_type
ifname="$(uci get network.$config.ifname)"
if_type="$(uci get network.$config.type)"
[ "$if_type" == "bridge" ] || return
for ifc in $ifname; do
if [ "$ifc" == "$iface" ]; then
net=$config
break
fi
done
[ -n "$net" ] && echo $net
}
config_load network
config_foreach find_network interface $1
}
check_mac_address()
{
local baseifname="$1"
local vlan="$2"
local basemac
local mac=$(ifconfig -a | grep "^${baseifname}.${vlan} " | awk '{print $NF}')
local br_name=$(get_bridge_of ${baseifname}.${vlan})
if [ -n "$br_name" ];then
local mac_in_use=$(ifconfig -a | grep "$mac" | grep -v "^${baseifname}.${vlan}[ ]" | grep -v "$br_name")
else
local mac_in_use=$(ifconfig -a | grep "$mac" | grep -v "^${baseifname}.${vlan}[ ]")
fi
if [ "$mac_in_use" ]; then
basemac=$(ifconfig -a | grep "^$baseifname " | awk '{print $NF}')
ifconfig ${baseifname}.${vlan} hw ether $basemac
fi
local baseifname="$1"
local vlan="$2"
local basemac
local mac=$(ifconfig -a | grep "^${baseifname}.${vlan} " | awk '{print $NF}')
local mac_in_use=$(ifconfig -a | grep "$mac" | grep -v "^${baseifname}.${vlan}[ ]")
if [ "$mac_in_use" ]; then
basemac=$(ifconfig -a | grep "^$baseifname " | awk '{print $NF}')
ifconfig ${baseifname}.${vlan} hw ether $basemac
fi
}
addbrcmvlan()

View File

@@ -1,48 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=loop-detector
PKG_VERSION:=1.0
PKG_SOURCE_VERSION:=d0fb770eacd6691b98df138b60f5116e02f71a9b
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/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))

View File

@@ -1,5 +0,0 @@
config loop-detect loop
option enabled '1'
option discovery_interval '10'
option recovery_check_tries '5'

View File

@@ -1,36 +0,0 @@
#!/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
}

41
mtk-bndstrg/Makefile Normal file
View File

@@ -0,0 +1,41 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mtk-bndstrg
PKG_VERSION:=1.0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=e5264d8da2a6de30c2e4e100dfee4dc5db0b59d0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/mtk-bndstrg
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/mtk-bndstrg
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libpthread +librt
TITLE:=Band steering daemon for Mediatek
endef
define Package/mtk-bndstrg/description
Band steering for Mediatek
endef
#define Build/Compile
#endef
define Build/Configure
#$(call Build/Configure/Default,--with-linux-headers=$(LINUX_DIR))
endef
define Package/mtk-bndstrg/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bndstrg $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,mtk-bndstrg))

View File

@@ -11,7 +11,7 @@ PKG_NAME:=natalie-dect-h
PKG_VERSION:=12.26
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=https://dev.iopsys.eu/dialog/natalie-dect-h.git
PKG_SOURCE_URL:=http://public.inteno.se:/natalie-dect-h
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=9e2236989ff58d0db897f938b6b07b535144e0e2
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -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:=git@private.inteno.se:natalie-dect-12.26
PKG_SOURCE_PROTO:=git
endif

View File

@@ -12,9 +12,9 @@ PKG_NAME:=peripheral_manager
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=959eca8ab2b50eaccfff9c710cffe5b317bb6ad1
PKG_SOURCE_VERSION:=ece02822d74c2d9e4be4ebd3ebef4e4a3f57e05d
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/peripheral-manager
PKG_SOURCE_URL:=http://public.inteno.se/peripheral_manager
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=3.1.40
PKG_VERSION:=3.1.38
PKG_SOURCE_VERSION:=947315714433ac9a4faf8e39f9ab285964a553d1
PKG_SOURCE_VERSION:=945be064408d5c6c1f1dfd34453d81657b8e1b87
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
PKG_SOURCE_URL:=http://public.inteno.se:/questd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -20,6 +20,11 @@ start_service() {
pidof imonitor > /dev/null 2>&1 || /sbin/imonitor &
}
stop() {
service_stop /sbin/questd
service_stop /sbin/graphd
}
service_triggers()
{
procd_add_reload_trigger network wireless
@@ -29,12 +34,3 @@ reload_service() {
ubus -t 5 call router.network reload
}
print_out_data() {
logger -t "environment" "Software Version: $(grep 'IOP Version' /etc/banner | awk '{print$3}')"
[ -s /etc/boot_reason ] && logger -t "environment" "Boot Reason: $(cat /etc/boot_reason)"
}
boot() {
print_out_data
start_service
}

View File

@@ -1,7 +1,6 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
# 1. sleep for $SLEEP_LONG seconds
# 2. run the check_* functions
@@ -23,7 +22,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=20000
MEM_LIMIT=15000
MEM_COUNT=4
MEM_NFAIL=0
@@ -32,37 +31,27 @@ PCPU_LIMIT=38
PCPU_COUNT=4
PCPU_NFAIL=0
# network call check
NNET_NFAIL=0
UBUS_TIMEOUT=5
BSDBIN=$(which bsd)
ACSDBIN=$(which acsd)
RESTART_ACSD=0
RESTART_BSD=0
DUALBAND=1
restart_questd()
{
logger -s -t $0[$$] "Restarting questd. $NPROC_NFAIL $MEM_NFAIL $PCPU_NFAIL $NNET_NFAIL"
logger -s -t $0[$$] "Restarting questd. $NPROC_NFAIL $MEM_NFAIL $PCPU_NFAIL"
killall -q -KILL questd
/etc/init.d/quest stop
killall -q -KILL questd
killall -q -KILL questd
/etc/init.d/quest start
sleep 5
NPROC_NFAIL=0
MEM_NFAIL=0
PCPU_NFAIL=0
NNET_NFAIL=0
}
check_nproc()
{
local nproc="$@"
@@ -121,52 +110,21 @@ 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()
{
killall -q -15 bsd 2>/dev/null
[ "$(nvram get wl0_radio)" == "1" -a "$(nvram get wl1_radio)" == "1" ] || {
[ $DUALBAND -eq 1 ] && logger -s -t $0[$$] "Band Steering is deactivated; will be re-activated when both 2.4GHz and 5GHz radios are enabled."
DUALBAND=0
return 0
} && DUALBAND=1
logger -s -t $0[$$] "Restarting Band Steering daemon due to bsd hangup."
if [ $RESTART_BSD -eq 3 ]; then
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
RESTART_ACSD=0
RESTART_BSD=0
else
RESTART_BSD=$((RESTART_BSD+1))
fi
bsd &
logger -s -t $0[$$] "Restarting bsd."
killall -q -KILL bsd
bsd
}
check_bsdcall()
@@ -183,19 +141,9 @@ check_bsdcall()
restart_acsd()
{
logger -s -t $0[$$] "Restarting Auto Channel Selection daemon due to acsd high CPU usage."
killall -q -9 acsd 2>/dev/null
if [ $RESTART_ACSD -eq 3 ]; then
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
RESTART_ACSD=0
RESTART_BSD=0
else
RESTART_ACSD=$((RESTART_ACSD+1))
fi
acsd
logger -s -t $0[$$] "Restarting acsd."
killall -q -KILL acsd
acsd &
}
check_acsd()
@@ -207,7 +155,7 @@ check_acsd()
for p in $pcpu; do
p=${p%%%*}
if [ "$p" -ge "40" ]; then
if [ "$p" -ge "20" ]; then
return 1
fi
done
@@ -245,23 +193,21 @@ 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
# bsdenabled="$(uci -q get wireless.bandsteering.enabled)"
# if [ $bsdenabled == "1" -a "$(pidof wifi)" == "" ] ; then
# check_bsdcall || restart_bsd
# fi
# fi
if [ "$BSDBIN" ] ; then
config_load wireless
config_get_bool bsdenabled bandsteering enabled 0
if [ $bsdenabled == "1" -a "$(pidof wifi)" == "" ] ; then
check_bsdcall || restart_bsd
fi
fi
# if [ "$ACSDBIN" ] ; then
# check_acsd || restart_acsd
# fi
if [ "$ACSDBIN" ] ; then
check_acsd || restart_acsd
fi
# sleep
if [ "$sample" -lt "$SAMPLES" ]; then

View File

@@ -8,10 +8,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=samba2
PKG_VERSION:=2.2.12
PKG_VERSION:=2.2.12.inteno
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/samba2.git
PKG_SOURCE_URL:=http://public.inteno.se:/samba2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d687d07a137981f4fe78cc289b040e6426c61e29
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -55,14 +55,11 @@ 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) \
@@ -96,7 +93,7 @@ define Build/Compile
clean
(cd $(PKG_BUILD_DIR)/source; rm -rf config.{cache,status}; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS_WITHOUT_WERR) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288" \
CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \
CPPFLAGS="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) $(LIBGCC_S)" \
ac_cv_lib_cups_httpConnect=no \

View File

@@ -11,11 +11,6 @@ useradd()
local password
config_get user $1 user
config_get password $1 password
filter="0A;5C 6E"
[ "$(hex_filter "$user" "$filter" 1)" = "" ] || return
[ "$(hex_filter "$password" "$filter" 1)" = "" ] || return
if ! $(grep -rq "^$user:" /etc/passwd) ; then
echo "adding user $user"
adduser $user -s /bin/false -D -H -h /mnt/$user -g "samba,pass=$password" && smbpasswd $user $password
@@ -56,29 +51,6 @@ purgepasswd()
done
}
hex_filter() {
local string=$1
local hex_chars=$2
local wc_max=$3
local wc_tot=0
if [ -z "$string" -o -z "$hex_chars" -o -z "$wc_max" ]
then
return;
fi
dump=$(echo "$string" | hexdump -v -e '32/1 "%02X ""\n"')
IFS=';'
for i in $hex_chars; do
local wc
wc=$(echo "$dump" | grep -o "$i" | wc -w)
wc_tot=$((wc_tot+wc))
done
[ $wc_tot -gt $wc_max ] && echo "corrupt"
}
smb_header() {
local interface
config_get interface $1 interface
@@ -108,14 +80,6 @@ smb_header() {
config_get description $1 description "Samba on ${hostname:-OpenWrt}"
config_get charset $1 charset "UTF-8"
filter="0A;5C 6E"
[ "$(hex_filter "$name" "$filter" 1)" = "" ] || exit
[ "$(hex_filter "$workgroup" "$filter" 1)" = "" ] || exit
[ "$(hex_filter "$description" "$filter" 1)" = "" ] || exit
[ "$(hex_filter "$interfaces" "$filter" 1)" = "" ] || exit
[ "$(hex_filter "$charset" "$filter" 1)" = "" ] || exit
mkdir -p /var/etc
sed -e "s#|NAME|#$name#g" \
-e "s#|WORKGROUP|#$workgroup#g" \
@@ -174,15 +138,6 @@ smb_add_share() {
path=$(readlink -f $path)
[ "${path:0:4}" == "/mnt" ] || path="/mnt/"
filter="0A;5C 6E"
[ "$(hex_filter "$name" "$filter" 1)" = "" ] || return
[ "$(hex_filter "$users" "$filter" 1)" = "" ] || return
[ "$(hex_filter "$read_only" "$filter" 1)" = "" ] || return
[ "$(hex_filter "$guest_ok" "$filter" 1)" = "" ] || return
[ "$(hex_filter "$create_mask" "$filter" 1)" = "" ] || return
[ "$(hex_filter "$dir_mask" "$filter" 1)" = "" ] || return
[ "$(hex_filter "$browseable" "$filter" 1)" = "" ] || return
echo -e "\n[$name]\n\tpath = $path" >> /var/etc/smb.conf
[ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf
[ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/smb.conf

View File

@@ -1,40 +0,0 @@
--- 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;
}
}

View File

@@ -6,7 +6,7 @@ PKG_RELEASE:=0
PKG_SOURCE_VERSION:=57786908e7a0c790f303417b459c562887582384
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/tptest.git
PKG_SOURCE_URL:=http://public.inteno.se:/tptest
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -1,5 +1,8 @@
config testserver '1'
option server 'referens.sth.ip-performance.se'
option port '1641'
option server 'tptest.bredband.net'
option port '1640'
config testserver '2'
option server 'referens.sth.ip-performance.se'
option port '1642'

View File

@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=tr064
PKG_VERSION:=1.0
PKG_SOURCE_URL:=https://dev.iopsys.eu/suite/tr-064.git
PKG_SOURCE_URL:=git@public.inteno.se:tr064.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e53d492a09c433718a520987c419cb6a4d4ae8dc
PKG_RELEASE=$(PKG_SOURCE_VERSION)

View File

@@ -10,9 +10,10 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=u-boot
PKG_VERSION:=2016.08
PKG_RELEASE:=4
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/uboot.git
PKG_SOURCE_URL:=http://public.inteno.se:/uboot
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=f502d1b589f14142bf7d7719e8434014f180d03f
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz

View File

@@ -11,7 +11,7 @@ PKG_NAME:=ubus-mqtt
PKG_VERSION:=14.20.0
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://dev.iopsys.eu/3rdparty/ubus-mqtt.git
PKG_SOURCE_URL:=http://public.inteno.se:/ubus-mqtt
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz

View File

@@ -16,7 +16,7 @@ define Package/voice-client
SECTION:=net
CATEGORY:=Network
TITLE:=voice-client
# DEPENDS:=@(asterisk13||asterisk18-mod)
DEPENDS:=+asterisk18-mod
endef
define Package/voice-client/description

View File

@@ -4,7 +4,7 @@ callerid=|CALLERID|
autodial=|AUTODIAL|
autodial_timeoutmsec=|AUTODIAL_TIMEOUT|
dialtone_timeoutmsec=|DIALTONE_TIMEOUT|
jitter_fixed=|JITTERFIXED|
;jitter_fixed=|JITTERFIXED|
;jitter_min=|JITTERMIN|
;jitter_max=|JITTERMAX|
;jitter_target=|JITTERTARGET|

View File

@@ -96,7 +96,7 @@ exten => s,n, Hangup()
;handle busy (with CBBS support)
exten => s-BUSY,1, Read(DIGIT,Busy,1,in,30)
exten => s-BUSY,n, GotoIf($["${DIGIT}" = "${ARG8}"]?ccbs)
exten => s-BUSY,n, GotoIf($[${DIGIT} = ${ARG8}]?ccbs)
exten => s-BUSY,n, Hangup()
exten => s-BUSY,n(ccbs), Set(result=${SHELL(/usr/lib/asterisk/cbbs.sh ${ARG1} ${ARG2} ${ARG3} ${ARG4} ${ARG5} ${ARG6} ${ARG7})})
exten => s-BUSY,n, Playback(beep)

View File

@@ -1,2 +1,2 @@
#exec echo 'register => |TRANSPORT|://|USER|@|DOMAIN|:'$(/usr/bin/voicesec -d /usr/lib/asterisk/voicesec_|PROVIDER|)'|AUTHUSER|@|PROVIDER||PORT|/|CONTACT_USER|'
#exec echo "register => |TRANSPORT|://|USER|@|DOMAIN|:$(/usr/bin/voicesec -d /usr/lib/asterisk/voicesec_|PROVIDER|)|AUTHUSER|@|PROVIDER||PORT|/|CONTACT_USER|"

View File

@@ -8,7 +8,6 @@ config 'brcm_line' 'brcm0'
option 'echo_cancel' 1
option 'callwaiting' '0'
option 'clir' '0'
option 'jitter_fixed' '50'
config 'brcm_line' 'brcm1'
option 'extension' '1111'
@@ -20,7 +19,6 @@ config 'brcm_line' 'brcm1'
option 'echo_cancel' 1
option 'callwaiting' '0'
option 'clir' '0'
option 'jitter_fixed' '50'
config 'brcm_line' 'brcm2'
option 'extension' '2222'
@@ -32,7 +30,6 @@ config 'brcm_line' 'brcm2'
option 'echo_cancel' 1
option 'callwaiting' '0'
option 'clir' '0'
option 'jitter_fixed' '50'
config 'brcm_line' 'brcm3'
option 'extension' '3333'
@@ -44,7 +41,6 @@ config 'brcm_line' 'brcm3'
option 'echo_cancel' 1
option 'callwaiting' '0'
option 'clir' '0'
option 'jitter_fixed' '50'
config 'brcm_line' 'brcm4'
option 'extension' '4444'
@@ -56,7 +52,6 @@ config 'brcm_line' 'brcm4'
option 'echo_cancel' 1
option 'callwaiting' '0'
option 'clir' '0'
option 'jitter_fixed' '50'
config 'brcm_line' 'brcm5'
option 'extension' '5555'
@@ -68,7 +63,6 @@ config 'brcm_line' 'brcm5'
option 'echo_cancel' 1
option 'callwaiting' '0'
option 'clir' '0'
option 'jitter_fixed' '50'
config 'brcm_line' 'brcm6'
option 'extension' '6666'
@@ -80,7 +74,6 @@ config 'brcm_line' 'brcm6'
option 'echo_cancel' 1
option 'callwaiting' '0'
option 'clir' '0'
option 'jitter_fixed' '50'
config 'brcm_line' 'brcm7'
option 'extension' '7777'
@@ -92,7 +85,6 @@ config 'brcm_line' 'brcm7'
option 'echo_cancel' 1
option 'callwaiting' '0'
option 'clir' '0'
option 'jitter_fixed' '50'
config 'dialplan' 'custom_dialplan'
option 'custom_outgoing_enabled' '0'
@@ -170,15 +162,8 @@ config 'sip_service_provider' 'sip0'
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 cbbs_key '5'
option cbbs_maxretry '5'
option cbbs_retrytime '20'
option cbbs_waittime '30'
option 'is_fax' '0'
option 'transport' 'udp'

View File

@@ -68,7 +68,6 @@ 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
@@ -81,7 +80,7 @@ TMPL_BRCM_LINE=$TEMPLATEDIR/brcm_line.TEMPLATE
TMPL_MEETME=$TEMPLATEDIR/meetme.conf.TEMPLATE
SPECRATECFG=$ASTERISKDIR/special_rate_nr.cfg
SPECRATEDIR=$ASTERISKDIR/special_rate_nr.cfg
run_hook()
{
@@ -98,13 +97,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
@@ -114,7 +113,7 @@ compare_configs_and_copy_changed()
{
# First, compute md5sums of the config files in $WORKDIR.
cd $WORKDIR/
md5sum * > $MD5SUMSFILE 2>/dev/null
md5sum * > $MD5SUMSFILE
# Now, check the files in $ASTERISKDIR against the md5sums.
cd $ASTERISKDIR/
@@ -142,15 +141,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.
[ -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
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
test -e $TMPL_MEETME && cp $TMPL_MEETME $WORKDIR/meetme.conf
@@ -179,7 +178,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
@@ -468,13 +467,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
@@ -543,7 +542,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"
@@ -721,10 +720,6 @@ configure_sip_provider()
config_get transport $1 transport
config_get encryption $1 encryption
# This is a hack to fix security issue #14962
user=${user//"'"/}
authuser=${authuser//"'"/}
if [ -z "$transport" ] ; then
transport="udp"
fi
@@ -809,7 +804,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.
@@ -1040,7 +1035,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
@@ -1132,13 +1127,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
}
@@ -1193,28 +1188,27 @@ 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
if [ -f $SPECRATECFG ]; then
while read line
do
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
# Get special rate numbers from /etc/asterisk/special_rate_nr.cfg
while read line
do
i=0
for v in $(echo $line | tr ";" "\n")
do
if [ "$i" -eq "0" -a "$v" != "$country" ] ; then
continue 2
fi
done < $SPECRATECFG
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"
echo "Found special rate numbers: $srn"
@@ -1333,8 +1327,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"
@@ -1359,20 +1353,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
@@ -1444,7 +1438,7 @@ configure_extensions()
if [ -n "$record_message_extension" ] ; then
echo "exten => $record_message_extension,1,Playback(beep)" >> $WORKDIR/extensions_local.tmp
echo "exten => $record_message_extension,n,Record(\"/usr/lib/asterisk/recordings/user-recording\${STRFTIME(\${EPOCH},,%C%y%m%d-%T)}.gsm\")" >> $WORKDIR/extensions_local.tmp
echo "exten => $record_message_extension,n,Record(\"/usr/lib/asterisk/recordings/user-recording\${STRFTIME(\${EPOCH},,%C%y%m%d-%T)}.gsm)" >> $WORKDIR/extensions_local.tmp
echo "exten => $record_message_extension,n,Playback(auth-thankyou)" >> $WORKDIR/extensions_local.tmp
echo "exten => $record_message_extension,n,Hangup()" >> $WORKDIR/extensions_local.tmp
fi
@@ -1647,7 +1641,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
@@ -1657,15 +1651,11 @@ configure_extensions_provider()
config_get call_queue $1 call_queue
config_get call_ivr $1 call_ivr
if [ -n "$incoming_lines" ]; then
echo "exten => $user,n,GotoIf(\${DB_EXISTS(CFBS/$1)}?cfbs)" >> $tmp
echo "exten => $user,n,Dial($incoming_lines,$(get_voicemail_timeout),tF(hangup,h,2))" >> $tmp
echo "exten => $user,n,Goto($user,nocfbs)" >> $tmp
echo "exten => $user,n(cfbs),Dial($incoming_lines,20,tF(hangup,h,2))" >> $tmp
echo "exten => $user,n(nocfbs),NoOp()" >> $tmp
echo "exten => $user,n,GotoIf($[\"\${DIALSTATUS}\"=\"ANSWER\"]?endcall)" >> $tmp
echo "exten => $user,n,GotoIf($[\"\${DIALSTATUS}\"=\"BUSY\"]?noanswer)" >> $tmp
echo "exten => $user,n,GotoIf($[\"\${DIALSTATUS}\"=\"NOANSWER\"]?noanswer:endcall)" >> $tmp
echo "exten => $user,n(noanswer),Macro(callhandler-noanswer,\${CHANNEL(peername)})" >> $tmp
echo "exten => $user,n,Dial($incoming_lines,$(get_voicemail_timeout),tF(hangup,h,2))" >> $tmp
echo "exten => $user,n,GotoIf($[\"\${DIALSTATUS}\"=\"ANSWER\"]?endcall)" >> $tmp
echo "exten => $user,n,GotoIf($[\"\${DIALSTATUS}\"=\"BUSY\"]?noanswer)" >> $tmp
echo "exten => $user,n,GotoIf($[\"\${DIALSTATUS}\"=\"NOANSWER\"]?noanswer:endcall)" >> $tmp
echo "exten => $user,n(noanswer),Macro(callhandler-noanswer,\${CHANNEL(peername)})" >> $tmp
# check for mailbox
config_get mailbox $1 mailbox
@@ -1714,7 +1704,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"
@@ -1731,7 +1721,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
@@ -2008,8 +1998,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
@@ -2021,7 +2011,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
@@ -2291,13 +2281,11 @@ 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
}

View File

@@ -9,6 +9,7 @@ uci -q batch <<-EOT
set voice_client.call_filter0.block_special_rate=0
set voice_client.call_filter0.block_outgoing=0
set voice_client.call_filter0.block_incoming=0
commit voice_client
EOT
}
@@ -21,6 +22,7 @@ uci -q batch <<-EOT
set voice_client.RINGING_STATUS.status=0
set voice_client.RINGING_STATUS.enabled=0
set voice_client.RINGING_STATUS.shouldring=1
commit voice_client
EOT
}
@@ -33,39 +35,5 @@ uci -q batch <<-EOT
commit firewall
EOT
# Workaround for devices with optional external Dect. For
# boards where the Dect HW has been left out in factory,
# we need to delete the brcm channels in UCI to prevent
# them from showing up in the phone GUI.
ulBoardStuffOption=$(tr -d "\x20\x0a" </proc/nvram/ulBoardStuffOption | tr -s "\x30")
if test "$ulBoardStuffOption" = "0" -a -x "/usr/sbin/dectmngr2"; then
/etc/init.d/dect disable
db -q batch <<-EOT
set hw.board.hasDect=0
commit hw.board
EOT
uci -q batch <<-EOT
delete voice_client.brcm0
delete voice_client.brcm1
delete voice_client.brcm2
delete voice_client.brcm3
EOT
fi
# Add a small jitter buffer in Broadcom DSP for all voice
# lines to compensate for chopping audio in some boards.
for brcm in $(db get hw.board.VoicePortOrder); do
uci -q get voice_client.${brcm}.jitter_fixed >/dev/null ||
uci -q add_list voice_client.${brcm}.jitter_fixed=50
done
# Common UCI commit at the end to save CPU resources.
uci -q commit voice_client
exit 0

View File

@@ -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:=git@private.inteno.se:voicesec
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=661c0091e579e284712aeed892e921cc84a6f0bb
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)