mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-27 22:50:19 +08:00
Compare commits
5 Commits
openwrt_up
...
testusp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be799bf3e4 | ||
|
|
fd0331625c | ||
|
|
faae36fa20 | ||
|
|
ba1a626f09 | ||
|
|
c2ffdbe815 |
@@ -8,10 +8,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.3.0
|
||||
PKG_VERSION:=1.2.0
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=5a5c94b289c79bc3a635b8d742dd9b73dcc0615f
|
||||
PKG_SOURCE_VERSION:=0c029ed2486342e7e7687631b702d5c743f3c41a
|
||||
PKG_NAME:=dectmngr2
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ PKG_VERSION:=1.0.0
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=7522faab4142fe2c0ac8cbf71bb0cc5bd49f0750
|
||||
PKG_SOURCE_VERSION:=be5b0d0c0a1c2abd335aaf19f01f63284d8cc285
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dslmngr.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
@@ -85,7 +85,7 @@ get_ipaddress() {
|
||||
json_get_keys keys
|
||||
|
||||
# jshn seems a bit iffy on having : in key, replace by _
|
||||
json_select "${1//:/_}" 2 > /dev/null
|
||||
json_select "${1//:/_}"
|
||||
json_get_var ip ip
|
||||
|
||||
echo "$ip"
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=easy-soc-libs
|
||||
PKG_VERSION:=1.0.1
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=c656cd47a9f911cfe3946e3d4a374b4ae9e5d801
|
||||
PKG_SOURCE_VERSION:=6bd703870262eca9ccbd8c4937c41fe842828ae3
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@inteno.se>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.2
|
||||
PKG_SOURCE_VERSION:=631e61b7ab5d86f2f4c86756a117badff9fb0f2c
|
||||
PKG_SOURCE_VERSION:=44e2472e8c08bef01fab27e8e908d5672f7af136
|
||||
|
||||
|
||||
ifeq ($(CONFIG_ENDPT_OPEN),y)
|
||||
|
||||
@@ -192,9 +192,9 @@ static int canyon_led_probe(struct platform_device *pdev)
|
||||
sk9822_set_color_str(leds, "00FF00");
|
||||
sk9822_update(leds);
|
||||
msleep(200);
|
||||
#endif
|
||||
sk9822_set_color_str(leds, "000000");
|
||||
sk9822_update(leds);
|
||||
#endif
|
||||
|
||||
printk(KERN_INFO "canyon led successfully probed\n");
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
#define SK9822_DEFAULT_NUM_LEDS 32 // U16, used if DT param fails
|
||||
#define SK9822_DEFAULT_BRIGHTNESS 1 // 5-bit brightness, 0-31
|
||||
#define SK9822_DEFAULT_BRIGHTNESS 15 // 5-bit brightness, 0-31
|
||||
|
||||
typedef struct {
|
||||
uint8_t b;
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=4.0-2019-05-21
|
||||
PKG_VERSION:=4.0-2019-04-05
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=3ae6954f55e90a339561719a0328c0cf3a4b018c
|
||||
PKG_SOURCE_VERSION:=f7e8cee5bcc578cc9bb9307e31d0c057676a377c
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
@@ -51,13 +51,6 @@ define Package/icwmp_xmpp
|
||||
DEPENDS:=+libuci +libubox +libexpat +libstrophe
|
||||
endef
|
||||
|
||||
define Package/icwmp_twamp
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=TR-069 twamp feature
|
||||
DEPENDS:=+libuci
|
||||
endef
|
||||
|
||||
define Package/icwmp_udpechoserver
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
@@ -226,15 +219,6 @@ define Package/icwmp_udpechoserver/install
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp_udpechoserver $(1)/etc/config
|
||||
endef
|
||||
|
||||
define Package/icwmp_twamp/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/icwmp_twampd $(1)/usr/sbin/icwmp_twampd
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmp_twampd $(1)/etc/init.d/icwmp_twampd
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp_twamp $(1)/etc/config
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/include/libdatamodel
|
||||
@@ -271,5 +255,4 @@ $(eval $(call BuildPackage,libdatamodel))
|
||||
$(eval $(call BuildPackage,icwmp_stun))
|
||||
$(eval $(call BuildPackage,icwmp_xmpp))
|
||||
$(eval $(call BuildPackage,icwmp_udpechoserver))
|
||||
$(eval $(call BuildPackage,icwmp_twamp))
|
||||
$(eval $(call BuildPackage,icwmp-zstream))
|
||||
|
||||
@@ -44,6 +44,7 @@ CONFIG_PACKAGE_juci-minidlna=y
|
||||
CONFIG_PACKAGE_juci-mod-status=y
|
||||
CONFIG_PACKAGE_juci-mod-system=y
|
||||
CONFIG_PACKAGE_juci-mwan3=y
|
||||
CONFIG_PACKAGE_juci-natalie-dect=y
|
||||
CONFIG_PACKAGE_juci-netmode=y
|
||||
CONFIG_PACKAGE_juci-network-device=y
|
||||
CONFIG_PACKAGE_juci-network-dsl=y
|
||||
|
||||
@@ -171,8 +171,8 @@ function genconfig {
|
||||
echo -e " -a|--list-all\t\tList all Customers and their board types"
|
||||
echo -e " -b|--boards\t\tList all board types"
|
||||
echo
|
||||
echo "Example ./iop genconfig dg200 TELIA"
|
||||
echo "(if no customerconfig is chosen, iopsys config will be used)"
|
||||
echo "Example ./iop genconfig vg50 TELIA"
|
||||
echo "(if no customerconfig is chosen the Inteno Config will be used)"
|
||||
echo
|
||||
exit 0
|
||||
}
|
||||
@@ -439,7 +439,7 @@ function genconfig {
|
||||
shift;
|
||||
done
|
||||
|
||||
CUSTREPO="${CUSTREPO:-git@dev.iopsys.eu:consumer/iopsys.git}"
|
||||
CUSTREPO="${CUSTREPO:-git@private.inteno.se:customerconfigs}"
|
||||
|
||||
setup_dirs
|
||||
create_and_copy_files "$@"
|
||||
|
||||
@@ -21,6 +21,7 @@ upd_ubi_id="" # num, UBI volume number for the volume name
|
||||
run_cleanup=0 # if set the cleanup should be run otherwise we skip it.
|
||||
run_mount_cleanup=0 # set if we should run umount in cleanup
|
||||
upd_kernel=0 # set to 1 if system has the kernel in own mtd partition
|
||||
upd_cfe=0 # set to 1 if system is using cfe as bootloader.
|
||||
log_stdout=1 # set to 0 to prevent the log to also print to stdout
|
||||
upd_noreboot=0 # set to 1 if we should not reboot after programming
|
||||
upd_forceimage=0 # set this to force upgrade even if image is for wrong board.
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
"CG300",
|
||||
"CG301",
|
||||
"EX400",
|
||||
"SDX810-AP",
|
||||
"NORRLAND"
|
||||
"SDX810-AP"
|
||||
],
|
||||
"acl" : [
|
||||
"admin",
|
||||
|
||||
@@ -47,10 +47,10 @@ config wifi-iface
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter 'disable'
|
||||
option wps '1'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option maxassoc '32'
|
||||
option bss_max '32'
|
||||
option ifname 'wl0'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
@@ -87,9 +87,9 @@ config wifi-iface
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter 'disable'
|
||||
option wps '1'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option maxassoc '32'
|
||||
option bss_max '32'
|
||||
option ifname 'wl1'
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"*G*",
|
||||
"F*",
|
||||
"NORRLAND"
|
||||
"F*"
|
||||
],
|
||||
"uplink_band" : 'a',
|
||||
"downlink_band" : 'a b',
|
||||
|
||||
@@ -27,7 +27,7 @@ config wifi-iface
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname ra0
|
||||
option wps 1
|
||||
option wps_pbc 1
|
||||
|
||||
config wifi-device rai0
|
||||
option band a
|
||||
@@ -46,7 +46,7 @@ config wifi-iface
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname rai0
|
||||
option wps 1
|
||||
option wps_pbc 1
|
||||
|
||||
config wifi-iface
|
||||
option device rai0
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"EX4*",
|
||||
"SDX810-AP",
|
||||
"NORRLAND"
|
||||
"SDX810-AP"
|
||||
],
|
||||
"credentials" : 0
|
||||
}
|
||||
|
||||
@@ -47,10 +47,10 @@ config wifi-iface
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter 'disable'
|
||||
option wps '1'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option maxassoc '32'
|
||||
option bss_max '32'
|
||||
option ifname 'wl0'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
@@ -87,9 +87,9 @@ config wifi-iface
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter 'disable'
|
||||
option wps '1'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option maxassoc '32'
|
||||
option bss_max '32'
|
||||
option ifname 'wl1'
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"*G*",
|
||||
"F*",
|
||||
"NORRLAND"
|
||||
"F*"
|
||||
],
|
||||
"reboot" : 0,
|
||||
"credentials" : 0
|
||||
|
||||
@@ -27,7 +27,7 @@ config wifi-iface
|
||||
option ssid iopsys-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option wps 1
|
||||
option wps_pbc 1
|
||||
option ifname ra0
|
||||
|
||||
config wifi-device rai0
|
||||
@@ -47,6 +47,6 @@ config wifi-iface
|
||||
option ssid iopsys-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option wps 1
|
||||
option wps_pbc 1
|
||||
option ifname rai0
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
NMTMPDIR=/var/netmodes
|
||||
OLD_MODE_FILE=/var/netmodes/old_mode
|
||||
CONF_BACKUP_DIR=/var/netmodes/backup/
|
||||
SWITCHMODELOCK="/tmp/switching_mode"
|
||||
MODEDIR=$(uci -q get netmode.setup.dir)
|
||||
MTK=0
|
||||
@@ -180,11 +179,6 @@ switch_netmode() {
|
||||
|
||||
run_netmode_scripts $curmode "pre"
|
||||
|
||||
# make backup of current config before switching
|
||||
rm -rf $CONF_BACKUP_DIR
|
||||
mkdir -p $CONF_BACKUP_DIR
|
||||
cp -af /etc/config/* $CONF_BACKUP_DIR
|
||||
|
||||
logger -s -p user.info -t $0 "[netmode] Copying /etc/netmodes/$curmode in /etc/config" >/dev/console
|
||||
|
||||
for file in $(ls /etc/netmodes/$curmode/); do
|
||||
@@ -232,28 +226,6 @@ switch_netmode() {
|
||||
run_netmode_scripts $curmode "post"
|
||||
}
|
||||
|
||||
revert_netmode() {
|
||||
local from="$1"
|
||||
local to="$2"
|
||||
local rready="$3"
|
||||
|
||||
ubus call leds set '{"state" : "allflash"}'
|
||||
echo "Could not switch to '$from' mode; going back to '$to' mode" > /dev/console
|
||||
uci -q set netmode.setup.curmode="$to"
|
||||
uci -q set netmode.setup.repeaterready="$rready"
|
||||
uci commit netmode
|
||||
cp -af $CONF_BACKUP_DIR/* /etc/config/
|
||||
sync
|
||||
rm -rf $CONF_BACKUP_DIR
|
||||
rm -rf $OLD_MODE_FILE
|
||||
|
||||
echo "Restarting network services" > /dev/console
|
||||
ubus call network reload
|
||||
wifi reload
|
||||
ubus call router.network reload
|
||||
ubus call leds set '{"state" : "normal"}'
|
||||
}
|
||||
|
||||
wificontrol_takes_over() {
|
||||
local ret
|
||||
[ -f /sbin/wificontrol ] || return
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
WIFISTA=0
|
||||
STACONF="/etc/Wireless/iNIC/iNIC_ap.dat"
|
||||
[ -f $STACONF ] && WIFISTA=1
|
||||
|
||||
get_if_creds() {
|
||||
local section=$1
|
||||
local network=$2
|
||||
@@ -88,22 +84,9 @@ duplicate_if_single_radio() {
|
||||
done
|
||||
}
|
||||
|
||||
get_wifi_iface_cfgstr() {
|
||||
get_cfgno() {
|
||||
config_get ifname "$1" ifname
|
||||
[ "$ifname" == "$2" ] && echo "wireless.$1"
|
||||
}
|
||||
config_load wireless
|
||||
config_foreach get_cfgno wifi-iface $1
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
list)
|
||||
if [ $WIFISTA -eq 1 ]; then
|
||||
echo '{ "get_creds": { "network": "str", "file": "str" }, "set_creds": { "file": "str", "from_gui": "str" }, "connect": { "ssid": "str", "key": "str" }, "forget_network": {} }'
|
||||
else
|
||||
echo '{ "get_creds": { "network": "str", "file": "str" }, "set_creds": { "file": "str", "from_gui": "str" } }'
|
||||
fi
|
||||
echo '{ "get_creds": { "network": "str", "file": "str" }, "set_creds": { "file": "str", "from_gui": "str" } }'
|
||||
;;
|
||||
call)
|
||||
case "$2" in
|
||||
@@ -153,64 +136,6 @@ case "$1" in
|
||||
json_dump
|
||||
|
||||
;;
|
||||
connect)
|
||||
local ssid key enc auth wetif wetcfg wetssid wetkey code
|
||||
read input
|
||||
json_load "$input"
|
||||
json_get_var ssid ssid
|
||||
json_get_var key key
|
||||
code=1
|
||||
[ $WIFISTA -eq 1 ] && wetif="$(uci -q get wireless.$(uci show wireless | grep 'mode=.*wet.*' | cut -d'.' -f2 | head -1).ifname)"
|
||||
if [ -s /sys/class/net/$wetif/operstate ]; then
|
||||
wetcfg="$(get_wifi_iface_cfgstr $wetif)"
|
||||
wetssid="$(uci -q get $wetcfg.ssid)"
|
||||
wetkey="$(uci -q get $wetcfg.key)"
|
||||
ssid="${ssid:-$wetssid}"
|
||||
key="${key:-$wetkey}"
|
||||
if [ -n "$key" ]; then
|
||||
auth="WPA2PSK"
|
||||
enc="AES"
|
||||
else
|
||||
auth="OPEN"
|
||||
enc="NONE"
|
||||
fi
|
||||
iwpriv $wetif set ApCliEnable=0
|
||||
iwpriv $wetif set ApCliSsid="$ssid"
|
||||
iwpriv $wetif set ApCliAuthMode="$auth"
|
||||
iwpriv $wetif set ApCliEncrypType="$enc"
|
||||
iwpriv $wetif set ApCliWPAPSK="$key"
|
||||
iwpriv $wetif set ApCliEnable=1
|
||||
iwpriv $wetif set ApCliAutoConnect=1
|
||||
code=0
|
||||
fi
|
||||
json_init
|
||||
json_add_int "code" $code
|
||||
json_dump
|
||||
;;
|
||||
forget_network)
|
||||
local wetif wetcfg code
|
||||
code=1
|
||||
[ $WIFISTA -eq 1 ] && wetif="$(uci -q get wireless.$(uci show wireless | grep 'mode=.*wet.*' | cut -d'.' -f2 | head -1).ifname)"
|
||||
if [ -s /sys/class/net/$wetif/operstate ]; then
|
||||
wetcfg="$(get_wifi_iface_cfgstr $wetif)"
|
||||
uci -q set $wetcfg.ssid=""
|
||||
uci -q set $wetcfg.key=""
|
||||
uci -q commit wireless
|
||||
|
||||
sed -i "s/ApCliSsid=.*/ApCliSsid=/g" $STACONF
|
||||
sed -i "s/ApCliAuthMode=.*/ApCliAuthMode=/g" $STACONF
|
||||
sed -i "s/ApCliEncrypType=.*/ApCliEncrypType=/g" $STACONF
|
||||
sed -i "s/ApCliWPAPSK=.*/ApCliWPAPSK=/g" $STACONF
|
||||
|
||||
ifconfig $wetif down
|
||||
ifconfig $wetif up
|
||||
|
||||
code=0
|
||||
fi
|
||||
json_init
|
||||
json_add_int "code" $code
|
||||
json_dump
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
choice
|
||||
prompt "Select IPC Bus"
|
||||
prompt "Select Bus"
|
||||
default OWSD_USE_UBUS
|
||||
depends on PACKAGE_owsd
|
||||
help
|
||||
Select which IPC bus to compile owsd for
|
||||
Select which bus to compile owsd for
|
||||
|
||||
config OWSD_USE_DBUS
|
||||
bool "Use DBUS"
|
||||
@@ -15,11 +15,3 @@ config OWSD_USE_DBUS_UBUS
|
||||
bool "Use UBUS and DBUS"
|
||||
|
||||
endchoice
|
||||
|
||||
config OWSD_UPROXYD
|
||||
bool "Enable UBUS Proxy Daemon"
|
||||
default y if OWSD_USE_UBUS || OWSD_USE_DBUS_UBUS
|
||||
help
|
||||
Enabling uproxyd automates detection of other
|
||||
UBUS-X enabled devices in the network
|
||||
|
||||
|
||||
@@ -5,27 +5,25 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=owsd
|
||||
PKG_VERSION:=1.1.2
|
||||
PKG_VERSION:=1.1.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/owsd.git
|
||||
PKG_SOURCE_VERSION:=da5bcdbaa96d01e878d921c90c34a04bbdfca973
|
||||
PKG_SOURCE_VERSION:=f0eedeb6fd061edf3784d6bf86fa60b176bf3fe7
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_OWSD_USE_DBUS CONFIG_OWSD_USE_UBUS CONFIG_OWSD_USE_DBUS_UBUS CONFIG_OWSD_UPROXYD
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_OWSD_USE_DBUS CONFIG_OWSD_USE_UBUS CONFIG_OWSD_USE_DBUS_UBUS
|
||||
|
||||
USE_UBUS-y:=-DWSD_HAVE_UBUS=ON
|
||||
USE_DBUS-y:=-DWSD_HAVE_DBUS=ON
|
||||
USE_BOTH-y:=${USE_UBUS-y} ${USE_DBUS-y}
|
||||
USE_UPROXYD-y:=-DOWSD_UPROXYD=ON
|
||||
|
||||
CMAKE_OPTIONS:=${USE_UBUS-${CONFIG_OWSD_USE_UBUS}} \
|
||||
${USE_DBUS-${CONFIG_OWSD_USE_DBUS}} \
|
||||
${USE_BOTH-${CONFIG_OWSD_USE_DBUS_UBUS}} \
|
||||
${USE_UPROXYD-${CONFIG_OWSD_UPROXYD}}
|
||||
${USE_BOTH-${CONFIG_OWSD_USE_DBUS_UBUS}}
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
@@ -53,14 +51,14 @@ endef
|
||||
define Package/owsd/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owsd $(1)/usr/bin/owsd
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uproxyd $(1)/sbin/uproxyd
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/owsd.init $(1)/etc/init.d/owsd
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./files/owsd.config $(1)/etc/config/owsd
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||
$(INSTALL_BIN) ./files/owsd.hotplug $(1)/etc/hotplug.d/iface/55-owsd
|
||||
# $(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
# $(INSTALL_BIN) ./files/owsd.uci_default $(1)/etc/uci-defaults/55-owsd-interfaces
|
||||
endef
|
||||
|
||||
define Package/owsd-testdata
|
||||
|
||||
@@ -150,7 +150,6 @@ validate_owsd_iface() {
|
||||
'origin:list(string)' \
|
||||
'whitelist_interface_as_origin:bool:0' \
|
||||
'whitelist_dhcp_domains:bool:0' \
|
||||
'whitelist_all_origins:bool:0' \
|
||||
'ipv6:bool:1' \
|
||||
'ipv6only:bool:0' \
|
||||
'linklocal:bool:0' \
|
||||
@@ -164,7 +163,7 @@ validate_owsd_iface() {
|
||||
}
|
||||
|
||||
parse_owsd_iface() {
|
||||
local port interface whitelist_interface_as_origin whitelist_dhcp_domains whitelist_all_origins ipv6 ipv6only linklocal
|
||||
local port interface whitelist_interface_as_origin whitelist_dhcp_domains ipv6 ipv6only linklocal
|
||||
local cert key ca
|
||||
local restrict_to_user
|
||||
local ubusx_acl
|
||||
@@ -192,23 +191,9 @@ parse_owsd_iface() {
|
||||
|
||||
}
|
||||
|
||||
origin_whitelist_all() {
|
||||
[ "$1" = "*" ] && echo "true"
|
||||
}
|
||||
|
||||
append_whitelists () {
|
||||
config_list_foreach "$1" "origin" append_origin
|
||||
|
||||
whitelist=$(config_list_foreach "$1" "origin" origin_whitelist_all)
|
||||
|
||||
[ -n "$whitelist" ] && whitelist_all_origins=1
|
||||
|
||||
if [ "$whitelist_all_origins" -eq 1 ]; then
|
||||
procd_append_param command -O
|
||||
whitelist_dhcp_domains=1
|
||||
whitelist_interface_as_origin=1
|
||||
fi
|
||||
|
||||
if [ "$whitelist_dhcp_domains" -eq 1 ]; then
|
||||
for domain in $DHCP_DOMAINS; do
|
||||
append_origin_parts "${http}" "${domain}" "${port}"
|
||||
@@ -316,15 +301,11 @@ start_service() {
|
||||
procd_set_param respawn
|
||||
|
||||
procd_close_instance
|
||||
|
||||
if [ "${enable}" -eq 1 ]; then
|
||||
# Start uproxyd
|
||||
procd_open_instance
|
||||
procd_set_param command $UPROXYD
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
fi
|
||||
|
||||
# Start uproxyd
|
||||
procd_open_instance
|
||||
procd_set_param command $UPROXYD
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
#stop_service()
|
||||
|
||||
87
owsd/files/owsd.uci_default
Normal file
87
owsd/files/owsd.uci_default
Normal file
@@ -0,0 +1,87 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
MGMT_INTERFACES=""
|
||||
OWSD_INTERFACES=""
|
||||
NOT_DEFAULT=0
|
||||
|
||||
mgmt_interfaces() {
|
||||
local interface=$1
|
||||
[ "$interface" == "loopback" ] && return
|
||||
[ "$interface" == "lan" ] && return
|
||||
[ "$interface" == "wan" ] && return
|
||||
[ "$interface" == "wan6" ] && return
|
||||
|
||||
local type proto
|
||||
config_get type $interface type
|
||||
config_get proto $interface proto "none"
|
||||
[ "$type" == "bridge" -a "$proto" == "none" ] && return
|
||||
|
||||
local is_lan
|
||||
config_get is_lan $interface is_lan
|
||||
[ "$is_lan" == "1" ] && return
|
||||
|
||||
local ifname
|
||||
config_get ifname $interface ifname
|
||||
[ "${ifname:0:1}" == "@" ] && return
|
||||
|
||||
MGMT_INTERFACES="$MGMT_INTERFACES $interface"
|
||||
}
|
||||
|
||||
owsd_interfaces() {
|
||||
local config=$1
|
||||
local interface
|
||||
config_get interface $config interface
|
||||
[ "$interface" == "loopback" ] && return
|
||||
[ "$interface" == "lan" ] && return
|
||||
[ "$interface" == "wan" ] && return
|
||||
[ "$interface" == "wan6" ] && return
|
||||
|
||||
OWSD_INTERFACES="$OWSD_INTERFACES $interface"
|
||||
|
||||
NOT_DEFAULT=1
|
||||
}
|
||||
|
||||
not_owsd() {
|
||||
local interface=$1
|
||||
local there=0
|
||||
for owsd in $OWSD_INTERFACES; do
|
||||
if [ "$interface" == "$owsd" ]; then
|
||||
there=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
return $there
|
||||
}
|
||||
|
||||
config_load network
|
||||
config_foreach mgmt_interfaces interface
|
||||
|
||||
config_load owsd
|
||||
config_foreach owsd_interfaces owsd-listen
|
||||
|
||||
if [ $NOT_DEFAULT -eq 0 ]; then
|
||||
for mgmt in $MGMT_INTERFACES; do
|
||||
if $(not_owsd $mgmt); then
|
||||
uci -q set owsd.$mgmt=owsd-listen
|
||||
uci -q set owsd.$mgmt.port=80
|
||||
uci -q set owsd.$mgmt.interface="$mgmt"
|
||||
uci -q set owsd.$mgmt.ipv6="on"
|
||||
uci -q set owsd.$mgmt.whitelist_interface_as_origin="1"
|
||||
uci -q set owsd.$mgmt.origin="*"
|
||||
|
||||
uci -q set owsd.$mgmt"_8080"=owsd-listen
|
||||
uci -q set owsd.$mgmt"_8080".port=8080
|
||||
uci -q set owsd.$mgmt"_8080".interface="$mgmt"
|
||||
uci -q set owsd.$mgmt"_8080".ipv6="on"
|
||||
uci -q set owsd.$mgmt"_8080".whitelist_interface_as_origin="1"
|
||||
uci -q set owsd.$mgmt"_8080".origin="*"
|
||||
|
||||
uci commit owsd
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -12,7 +12,7 @@ PKG_NAME:=peripheral_manager
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=769430115b6dd984313574c3fa2a6d99c65cd223
|
||||
PKG_SOURCE_VERSION:=c1598f9dc8f2d67fbfcfd831052f40b3cde3d19c
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/peripheral-manager
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=questd
|
||||
PKG_VERSION:=4.1.0
|
||||
PKG_VERSION:=4.0.1
|
||||
|
||||
PKG_SOURCE_VERSION:=3c7c4da8cdf14e4abb75a41e3ef9f2eddc9d75ae
|
||||
PKG_SOURCE_VERSION:=d19501b6f80ef649b2ffd2f87132df885ce4581f
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
|
||||
|
||||
@@ -59,6 +59,7 @@ define Package/questd/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/questd $(1)/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wificontrol $(1)/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/graphd $(1)/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uproxyd $(1)/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/netcheck $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
@@ -12,7 +12,7 @@ PKG_INSTALL:=1
|
||||
|
||||
PKG_SOURCE_PROTO=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/rulengd.git
|
||||
PKG_SOURCE_VERSION:=ad94ccdd82b22527ab32937ca1a2682030319ed3
|
||||
PKG_SOURCE_VERSION:=63569245b62d90d3106cc826f2d2b18f51c0b885
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||
PKG_INSTALL:=1
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
config rule
|
||||
option event 'test.event'
|
||||
list event_data "{'test': 1, 'reason': 1}"
|
||||
list event_data "{'tests': [1, 2, 3]}"
|
||||
option method 'file->write'
|
||||
list method_data "{'path': '/tmp/test_event.txt'}"
|
||||
list method_data "{'data': 'test event received!'}"
|
||||
|
||||
@@ -14,7 +14,7 @@ PKG_SOURCE_PROTO:=git
|
||||
|
||||
ifdef CONFIG_TARGET_intel_mips
|
||||
PKG_SOURCE_URL:=git@dev.iopsys.eu:intel/uboot.git
|
||||
PKG_SOURCE_VERSION:=c77089efc41ea3292125330221bd5016796631b9
|
||||
PKG_SOURCE_VERSION:=0ef53f269c27f8e736fd30fd1a874159f70c76bf
|
||||
else
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/uboot.git
|
||||
PKG_SOURCE_VERSION:=3ef2ba866a99205496e0ce01935c89a1778d9b85
|
||||
@@ -74,7 +74,7 @@ define uboot/grx500_norrland
|
||||
TITLE:=U-Boot for Norrland Board
|
||||
UBOOT_IMG:=u-boot-nand.bin
|
||||
DEPENDS:=@TARGET_intel_mips
|
||||
PKG_RELEASE:=14
|
||||
PKG_RELEASE:=10
|
||||
endef
|
||||
|
||||
UBOOTS := \
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uspd
|
||||
PKG_VERSION:=1.0.1
|
||||
PKG_VERSION:=1.0.0
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=50a4346d518fd80d22cd9694ee3c1dba336bd072
|
||||
PKG_SOURCE_VERSION:=64f39a5041da3d6c0a45cbc901dea3bd062d96fe
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/uspd.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
@@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/uspd
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=USP ubus backend
|
||||
TITLE:=TR069 extention for USP
|
||||
DEPENDS:=+libubox +ubus +icwmp-curl
|
||||
endef
|
||||
|
||||
@@ -130,7 +130,7 @@ exten => s,1, Goto(s-${DIALSTATUS},1)
|
||||
exten => s,n, Hangup()
|
||||
|
||||
;handle busy (with CBBS support)
|
||||
exten => s-BUSY,1, Read(DIGIT,Busy,1,i,30)
|
||||
exten => s-BUSY,1, Read(DIGIT,Busy,1,in,30)
|
||||
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})})
|
||||
|
||||
@@ -17,8 +17,8 @@ START=60
|
||||
USE_PROCD=1
|
||||
|
||||
# Some global variables
|
||||
SERIAL="$(getSerial)"
|
||||
BASEMAC="$(getBaseMAC)"
|
||||
SERIAL=$(getSerial)
|
||||
BASEMAC=$(getBaseMAC)
|
||||
MODULENAME=voice
|
||||
USERAGENT="Inteno_${SERIAL}_${BASEMAC}"
|
||||
|
||||
@@ -32,10 +32,7 @@ ASTERISKDIR=/etc/asterisk
|
||||
WORKDIR=/tmp/$MODULENAME.$$
|
||||
MD5SUMSFILE=/tmp/$MODULENAME-sums.$$
|
||||
|
||||
LINENAME="$(getLineName)"
|
||||
CHANNELNAME="$(getChannelName)"
|
||||
|
||||
# Whitespace separated list of $CHANNELNAME feature access codes
|
||||
# Whitespace separated list of $(getChannelName) feature access codes
|
||||
CHANNEL_FAC=
|
||||
|
||||
#TODO: go through templates, check usage
|
||||
@@ -85,7 +82,7 @@ TMPL_ACL=$TEMPLATEDIR/acl.conf.TEMPLATE
|
||||
TMPL_CONFBRIDGE=$TEMPLATEDIR/confbridge.conf.TEMPLATE
|
||||
TMPL_UDPTL=$TEMPLATEDIR/udptl.conf.TEMPLATE
|
||||
|
||||
TMPL_CHANNEL=$TEMPLATEDIR/$LINENAME.conf.TEMPLATE
|
||||
TMPL_CHANNEL=$TEMPLATEDIR/$(getLineName).conf.TEMPLATE
|
||||
TMPL_CHANNEL_LINE=$TEMPLATEDIR/tel_line.TEMPLATE
|
||||
|
||||
TMPL_MEETME=$TEMPLATEDIR/meetme.conf.TEMPLATE
|
||||
@@ -185,7 +182,7 @@ assemble_and_copy_config()
|
||||
mv $WORKDIR/sip_registrations.tmp $WORKDIR/sip_registrations.conf
|
||||
mv $WORKDIR/sip_providers.tmp $WORKDIR/sip_providers.conf
|
||||
mv $WORKDIR/sip_users.tmp $WORKDIR/sip_users.conf
|
||||
mv $WORKDIR/$LINENAME.tmp $WORKDIR/$LINENAME.conf
|
||||
mv $WORKDIR/$(getLineName).tmp $WORKDIR/$(getLineName).conf
|
||||
mv $WORKDIR/extensions.tmp $WORKDIR/extensions.conf
|
||||
mv $WORKDIR/codecs.tmp $WORKDIR/codecs.conf
|
||||
mv $WORKDIR/rtp.tmp $WORKDIR/rtp.conf
|
||||
@@ -340,7 +337,7 @@ read_lines()
|
||||
for i in $call_lines ; do
|
||||
case $i in
|
||||
''|*[!0-9]*) lines=$lines"$i&" ;;
|
||||
*) lines=$lines"$CHANNELNAME/$i&" ;;
|
||||
*) lines=$lines"$(getChannelName)/$i&" ;;
|
||||
esac
|
||||
|
||||
done
|
||||
@@ -1035,9 +1032,9 @@ configure_queue()
|
||||
do
|
||||
local out=""
|
||||
re='^[0-9]+$'
|
||||
num=${member#$LINENAME}
|
||||
num=${member#$(getLineName)}
|
||||
if [ -z "${num##[0-9]*}" ] ; then
|
||||
out="$CHANNELNAME/$num"
|
||||
out="$(getChannelName)/$num"
|
||||
else
|
||||
local sip_user
|
||||
config_get sip_user $member user
|
||||
@@ -1481,7 +1478,6 @@ configure_extensions()
|
||||
#
|
||||
configure_extensions_provider()
|
||||
{
|
||||
echo COMES HERE
|
||||
local enabled
|
||||
local displayname
|
||||
local user
|
||||
@@ -1692,7 +1688,7 @@ configure_extensions_provider()
|
||||
echo "exten => $user,n(norewrite),NoOp()">> $tmp
|
||||
|
||||
# read a list of lines that should be dialled on incoming calls
|
||||
incoming_lines="$(read_lines $1)"
|
||||
incoming_lines=$(read_lines $1)
|
||||
config_get call_queue $1 call_queue
|
||||
config_get call_ivr $1 call_ivr
|
||||
if [ -n "$incoming_lines" ]; then
|
||||
@@ -1741,7 +1737,7 @@ configure_tel_line_extension()
|
||||
local cbbs_retrytime
|
||||
local cbbs_waittime
|
||||
local mailbox
|
||||
local line_name=$LINENAME
|
||||
local line_name=$(getLineName)
|
||||
|
||||
line=${1:${#line_name}}
|
||||
config_get extension $1 extension
|
||||
@@ -1846,11 +1842,11 @@ configure_codecs()
|
||||
}
|
||||
|
||||
#
|
||||
# Configure default settings for $LINENAME.conf
|
||||
# Configure default settings for $(getLineName).conf
|
||||
#
|
||||
configure_tel()
|
||||
{
|
||||
echo "Configuring $CHANNELNAME"
|
||||
echo "Configuring $(getChannelName)"
|
||||
local jbenable
|
||||
local jbforce
|
||||
local jbmaxsize
|
||||
@@ -1877,29 +1873,29 @@ configure_tel()
|
||||
dialoutmsec=4000
|
||||
fi
|
||||
|
||||
sed -i "s/|JBENABLE|/$jbenable/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|JBFORCE|/$jbforce/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|JBMAXSIZE|/$jbmaxsize/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|JBIMPL|/$jbimpl/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|DIALOUTMSEC|/$dialoutmsec/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|FAC|/$CHANNEL_FAC/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|CHANNELS|/$(db get hw.board.VoicePorts)/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|ECHOCANCEL|/$(getEchoCancellingValue $echocancel)/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|JBENABLE|/$jbenable/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|JBFORCE|/$jbforce/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|JBMAXSIZE|/$jbmaxsize/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|JBIMPL|/$jbimpl/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|DIALOUTMSEC|/$dialoutmsec/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|FAC|/$CHANNEL_FAC/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|CHANNELS|/$(db get hw.board.VoicePorts)/" $WORKDIR/$(getLineName).tmp
|
||||
sed -i "s/|ECHOCANCEL|/$(getEchoCancellingValue $echocancel)/" $WORKDIR/$(getLineName).tmp
|
||||
|
||||
if [ "$dtmfmode" == "compatibility" ] ; then
|
||||
dtmfcompatibility="1"
|
||||
else
|
||||
dtmfcompatibility="0"
|
||||
fi
|
||||
sed -i "s/|DTMFCOMPATIBILITY|/$dtmfcompatibility/" $WORKDIR/$LINENAME.tmp
|
||||
sed -i "s/|DTMFCOMPATIBILITY|/$dtmfcompatibility/" $WORKDIR/$(getLineName).tmp
|
||||
}
|
||||
|
||||
#
|
||||
# Configure settings for individual line in $LINENAME.conf
|
||||
# Configure settings for individual line in $(getLineName).conf
|
||||
#
|
||||
configure_tel_line()
|
||||
{
|
||||
echo "Configuring $CHANNELNAME line $1"
|
||||
echo "Configuring $(getChannelName) line $1"
|
||||
local extension
|
||||
local sip_provider
|
||||
local codecs
|
||||
@@ -1956,7 +1952,7 @@ configure_tel_line()
|
||||
sed -i "s/|DTMFRELAY|/$dtmfmode/" $WORKDIR/tel_line.tmp
|
||||
sed -i "s/|CALLWAITING|/$callwaiting/" $WORKDIR/tel_line.tmp
|
||||
sed -i "s/|CLIR|/$clir/" $WORKDIR/tel_line.tmp
|
||||
sed -i "s/|LINE_NAME|/$LINENAME/" $WORKDIR/tel_line.tmp
|
||||
sed -i "s/|LINE_NAME|/$(getLineName)/" $WORKDIR/tel_line.tmp
|
||||
|
||||
#Configure CHANNEL line with codecs according to the SIP line settings
|
||||
# local is_fax
|
||||
@@ -1967,7 +1963,7 @@ configure_tel_line()
|
||||
# sed -i "s/|ALLOW|/$(read_codecs $sip_provider)/" $WORKDIR/tel_line.tmp
|
||||
# fi
|
||||
|
||||
cat $WORKDIR/tel_line.tmp >> $WORKDIR/$LINENAME.tmp
|
||||
cat $WORKDIR/tel_line.tmp >> $WORKDIR/$(getLineName).tmp
|
||||
rm -f $WORKDIR/tel_line.tmp
|
||||
}
|
||||
|
||||
@@ -2067,14 +2063,14 @@ pbx_fix_ownership()
|
||||
}
|
||||
|
||||
#
|
||||
# Calculate a name for each $LINENAME line, depending on port type
|
||||
# Calculate a name for each $(getLineName) line, depending on port type
|
||||
# and number. The name is used to make UI look better.
|
||||
#
|
||||
set_line_name()
|
||||
{
|
||||
local maxlinenum=$2
|
||||
local curname name_ix ix item lnum
|
||||
local line_name=$LINENAME
|
||||
local line_name=$(getLineName)
|
||||
local line_name_len=${#line_name}
|
||||
local tel_line=$1
|
||||
|
||||
@@ -2180,7 +2176,7 @@ start_service() {
|
||||
cp $TMPL_SIP $WORKDIR/sip.tmp
|
||||
cp $TMPL_RTP $WORKDIR/rtp.tmp
|
||||
cp $TMPL_STUN $WORKDIR/res_stun_monitor.tmp
|
||||
cp $TMPL_CHANNEL $WORKDIR/$LINENAME.tmp
|
||||
cp $TMPL_CHANNEL $WORKDIR/$(getLineName).tmp
|
||||
cp $TMPL_CODECS $WORKDIR/codecs.tmp
|
||||
cp $TMPL_VOICEMAIL $WORKDIR/voicemail.tmp
|
||||
cp $TMPL_DNSMGR $WORKDIR/dnsmgr.tmp
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# Adapt to config section name changes
|
||||
grep -q brcm_line /etc/config/voice_client && sed -i 's/brcm_line/tel_line/g' /etc/config/voice_client
|
||||
grep -q brcm_advanced /etc/config/voice_client && sed -i 's/brcm_advanced/tel_advanced/g' /etc/config/voice_client
|
||||
grep -q BRCM /etc/config/voice_client && sed -i 's/BRCM/TEL/g' /etc/config/voice_client
|
||||
|
||||
# Add call filter section
|
||||
uci -q get voice_client.call_filter0 >/dev/null || {
|
||||
@@ -71,9 +70,9 @@ EOT
|
||||
# If dtmfmode is set to the obsolete compatability change to auto
|
||||
sed -i 's/dtmfmode\s*=\s*compatibility/dtmfmode=auto/' /etc/asterisk/sip.conf
|
||||
|
||||
if [ "$(uci get voice_client.SIP.dtmfmode)" == "compatibility" ]; then
|
||||
uci set voice_client.SIP.dtmfmode="auto"
|
||||
uci commit voice_client
|
||||
if [ $(uci get voice_client.SIP.dtmfmode) == 'compatibility' ]; then
|
||||
uci set voice_client.SIP.dtmfmode='auto'
|
||||
uci commit
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wifilife
|
||||
PKG_VERSION:=1.0.3
|
||||
PKG_VERSION:=1.0.2
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=fe0e8fd3832ef3a70ac3938f9b458d05a349b0be
|
||||
PKG_SOURCE_VERSION:=de6183cda406fbd1a98779bda2ea1b2ffb8f2e04
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
ifeq ($(CONFIG_WIFILIFE_OPEN),y)
|
||||
@@ -52,8 +52,10 @@ TARGET_CFLAGS += \
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/wifilife/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(CP) -r ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/wifilife.init $(1)/etc/init.d/wifilife
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/* $(1)/etc/uci-defaults/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wifiagent $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions/mbid.sh
|
||||
|
||||
remove_mbid_rules() {
|
||||
old_rules="$(cat "/tmp/mbid_rules" 2>/dev/null)"
|
||||
IFS=$'\n'
|
||||
for old_rule in $old_rules; do
|
||||
old_rule=${old_rule/-A /-D }
|
||||
eval $old_rule 2>/dev/null
|
||||
done
|
||||
rm /tmp/mbid_rules
|
||||
}
|
||||
|
||||
# read firewall parental rules and add repeated addresses
|
||||
append_mbid_rules() {
|
||||
[ "$(uci -q get owsd.ubusproxy.enable)" == "1" ] || return
|
||||
|
||||
octets=$(get_octets)
|
||||
mobid=$(get_mobid)
|
||||
[ -z "$mobid" -o -z "$octets" ] && return
|
||||
|
||||
rule=""
|
||||
oct2="$(echo $mobid | awk '{print $1}')"
|
||||
oct3="$(echo $mobid | awk '{print $2}')"
|
||||
rules="$(cat /tmp/fw3.rules.ipv4 | grep -i forward | grep -i "\-\-mac\-source")"
|
||||
[ -z "$rules" ] && return
|
||||
|
||||
IFS=$'\n'
|
||||
for rule in $rules; do
|
||||
chain="$(echo $rule | awk '{print tolower($5)}')"
|
||||
[ -z "$chain" -o "$chain" != "forward" ] && continue
|
||||
|
||||
# delete rule, replace --append with --delete
|
||||
del_rule=${rule/-A /-D }
|
||||
while [ -z "$(eval "$del_rule" 2>&1)" ]; do
|
||||
:
|
||||
done
|
||||
|
||||
mac=$(echo $rule | awk '{print $9}')
|
||||
|
||||
# re-append rule
|
||||
eval $rule
|
||||
|
||||
rpt_macs=$(repeated_macs $octets $oct2 $oct3 $mac | awk '{print toupper($0)}')
|
||||
> /tmp/mbid_rules
|
||||
for rpt_mac in $rpt_macs; do
|
||||
[ -z "$rpt_mac" ] && continue
|
||||
rpt_rule=${rule/$mac/$rpt_mac}
|
||||
del_rule=${rpt_rule/-A /-D }
|
||||
while [ -z "$(eval "$del_rule" 2>&1)" ]; do
|
||||
:
|
||||
done
|
||||
|
||||
eval $rpt_rule
|
||||
echo $rpt_rule >> /tmp/mbid_rules
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
while [ -f /tmp/mbid.lock ]; do
|
||||
sleep 2
|
||||
done
|
||||
touch /tmp/mbid.lock
|
||||
remove_mbid_rules
|
||||
append_mbid_rules
|
||||
rm /tmp/mbid.lock
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"if" : [
|
||||
{
|
||||
"event": "ubus.object.add",
|
||||
"regex": true,
|
||||
"match": {
|
||||
"path":".*\/wifi\\.agent"
|
||||
}
|
||||
}
|
||||
],
|
||||
"then" : [
|
||||
{
|
||||
"object": "file",
|
||||
"method":"exec",
|
||||
"args": {
|
||||
"command": "sh",
|
||||
"params": ["/etc/firewall.mbid"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -18,27 +18,5 @@ add_dnsmasq_lease_hwmask() {
|
||||
fi
|
||||
}
|
||||
|
||||
add_firewall_mbid() {
|
||||
local ubusx="$(uci -q get owsd.ubusproxy.enable)"
|
||||
if [ -f /etc/firewall.mbid ]; then
|
||||
uci -q get firewall.mbid || {
|
||||
uci -q set firewall.mbid=include
|
||||
uci -q set firewall.mbid.path="/etc/firewall.mbid"
|
||||
uci -q set firewall.mbid.reload=1
|
||||
uci del_list firewall.mbid._access_w=root
|
||||
uci add_list firewall.mbid._access_w=root
|
||||
uci commit firewall
|
||||
}
|
||||
fi
|
||||
}
|
||||
|
||||
add_ruleng_section() {
|
||||
uci -q add ruleng rule
|
||||
uci -q set ruleng.@rule[-1].recipe='/etc/ruleng/mbid.json'
|
||||
uci commit ruleng
|
||||
}
|
||||
|
||||
add_owsd_object_wifi
|
||||
add_dnsmasq_lease_hwmask
|
||||
add_firewall_mbid
|
||||
add_ruleng_section
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
mobid_cb() {
|
||||
local device mobility_domain
|
||||
|
||||
config_get device $1 device
|
||||
[ "$device" != "$2" ] && return;
|
||||
|
||||
config_get mobility_domain $1 mobility_domain
|
||||
echo "$mobility_domain"
|
||||
}
|
||||
|
||||
_get_mobid() {
|
||||
vif=$1
|
||||
config_load wireless
|
||||
mobid="$(config_foreach mobid_cb wifi-iface $vif)"
|
||||
echo $mobid
|
||||
}
|
||||
|
||||
repeated_macs() {
|
||||
octets=$1
|
||||
oct2=$2
|
||||
oct3=$3
|
||||
mac=$4
|
||||
macs=""
|
||||
oct456=${mac:9}
|
||||
|
||||
[ -z "$octets" -o -z "$oct2" -o -z "$oct3" -o -z "$mac" -o -z "$oct456" ] && return
|
||||
|
||||
IFS=$' '
|
||||
for oct1 in $octets; do
|
||||
macs="$oct1:$oct2:$oct3:$oct456 $macs"
|
||||
done
|
||||
|
||||
echo "$macs"
|
||||
}
|
||||
|
||||
# transform a mac address to all possibly repeated - recommended when parsing one or few MACs
|
||||
mac_to_repeated() {
|
||||
mac=$1
|
||||
octets=""
|
||||
oct2=""
|
||||
oct3=""
|
||||
|
||||
octets=$(get_octets)
|
||||
mobid=$(get_mobid)
|
||||
[ -z "$mobid" -o -z "$octets" ] && return
|
||||
|
||||
oct2="$(echo $mobid | awk '{print $1}')"
|
||||
oct3="$(echo $mobid | awk '{print $2}')"
|
||||
|
||||
echo "$(repeated_macs $octets $oct2 $oct3 $mac)"
|
||||
}
|
||||
|
||||
assocl_match_mac() {
|
||||
mac=$1
|
||||
|
||||
res="$(ubus call wifix assoclist 2>/dev/null)"
|
||||
|
||||
json_load "$res"
|
||||
json_select assoclist 2>/dev/null
|
||||
json_get_keys keys
|
||||
|
||||
IFS=$' '
|
||||
for key in $keys; do
|
||||
json_select $key 2>/dev/null
|
||||
json_get_var macaddr macaddr
|
||||
json_select ..
|
||||
|
||||
[ "$macaddr" = "$mac" ] || continue
|
||||
|
||||
octet=$(echo $macaddr | cut -c1-2)
|
||||
echo "$octet"
|
||||
done
|
||||
}
|
||||
|
||||
get_octet() {
|
||||
ip=$1
|
||||
|
||||
res="$(ubus call router.net arp 2>/dev/null)"
|
||||
|
||||
json_load "$res"
|
||||
json_select table 2>/dev/null
|
||||
json_get_keys keys
|
||||
IFS=$' '
|
||||
for key in $keys; do
|
||||
json_select $key 2>/dev/null
|
||||
json_get_var ipaddr ipaddr
|
||||
json_get_var macaddr macaddr
|
||||
json_select ..
|
||||
|
||||
[ "$ipaddr" = "$ip" ] || continue
|
||||
|
||||
echo "$(assocl_match_mac $macaddr)"
|
||||
done
|
||||
}
|
||||
|
||||
# only get all first octets - use when parsing several MACS
|
||||
get_octets() {
|
||||
octets=""
|
||||
assoclist=""
|
||||
neighbors=""
|
||||
|
||||
objects=$(ubus list | grep -E '.*\/wifix$')
|
||||
[ -z "$objects" ] && return
|
||||
|
||||
for obj in $objects; do
|
||||
ip=$(echo $obj | cut -d'/' -f1)
|
||||
octet="$(get_octet $ip)"
|
||||
[ "$octets" != "${octets/$octet/}" ] && continue
|
||||
octets="$octet $octets"
|
||||
done
|
||||
|
||||
echo "$octets"
|
||||
}
|
||||
|
||||
# get only mobid - use when parsing several MACS
|
||||
get_mobid() {
|
||||
mobid="500"
|
||||
|
||||
radios="$(ubus -t1 call wifix radios 2>/dev/null)"
|
||||
[ -z "$radios" ] && return
|
||||
|
||||
json_load "$radios"
|
||||
json_get_keys keys
|
||||
IFS=$' '
|
||||
for key in $keys; do
|
||||
val="$(_get_mobid $key)"
|
||||
[ -n "$val" ] && mobid=$val;
|
||||
done
|
||||
|
||||
mobid=$(printf "%04x" $mobid)
|
||||
|
||||
# if little endian
|
||||
if [ "$(echo -n I | hexdump -o | awk '{ print substr($2,6,1); exit}')" = "1" ]; then
|
||||
oct2=${mobid:2}
|
||||
oct3=${mobid%??}
|
||||
else
|
||||
oct2=${mobid%??}
|
||||
oct3=${mobid:2}
|
||||
fi
|
||||
|
||||
echo "$oct2 $oct3"
|
||||
}
|
||||
2
wifilife/files/etc/init.d/wifilife → wifilife/files/wifilife.init
Executable file → Normal file
2
wifilife/files/etc/init.d/wifilife → wifilife/files/wifilife.init
Executable file → Normal file
@@ -9,8 +9,6 @@ EXTRA_COMMANDS="enable_check"
|
||||
|
||||
|
||||
start_service() {
|
||||
[ "$(uci -q get wifilife.@wifilife[0].enabled)" == "0" ] && return
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG} -d -l -f -o /tmp/wifiagent.log
|
||||
procd_set_param respawn
|
||||
@@ -8,7 +8,7 @@ PKG_NAME:=wifimngr
|
||||
PKG_VERSION:=1.0.2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=5ab0a61b2d8dc34be0e0053670a13876e648f94b
|
||||
PKG_SOURCE_VERSION:=66a7e957f5e3e83ab60da68f7fb05cdda7f474d5
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user