Compare commits

...

57 Commits

Author SHA1 Message Date
Philippe Blavier
70f0315d8d Rename auto_feeds_conf to auto_feeds_conf.sh 2019-08-21 13:23:31 +02:00
Philippe Blavier
f3f3f69789 Create iop plugin auto_feeds_conf 2019-08-20 16:34:07 +02:00
Philippe Blavier
cf2c8972b3 Update feed [ iopsys ] package [ imonitor ]
-------------------------------------------------------------------------------
* cea6063 Update copyright year
-------------------------------------------------------------------------------
commit cea60630cfac1d3c70f486acea6663d339b7d444
Author: Philippe Blavier <philippe@southpole.se>
Date: 2019-05-23 15:03:28 +0200

    Update copyright year

Base directory -> /
 src/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2019-05-23 15:05:57 +02:00
Philippe Blavier
5d8dcb76df Remove trailing white spaces 2019-05-23 14:12:00 +02:00
Sukru Senli
525d55177a icwmp: fix tr-181 Device.Routing issues 2019-04-10 15:13:01 +02:00
Sukru Senli
5b69874139 iop: update_package: ignore the feed if not hash is used 2019-04-08 15:59:36 +02:00
Anjan Chanda
92c7c24a43 Update feed [ iopsys ] package [ wifimngr ]
-------------------------------------------------------------------------------
* c7228ea fix array size bounds for max interfaces
-------------------------------------------------------------------------------
commit c7228ea031f407580ff8e4801e0ba544aeadd050
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-04-08 13:40:40 +0200

    fix array size bounds for max interfaces

Base directory -> /
 wifimngr.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
2019-04-08 13:50:19 +02:00
Sachin Singla
906f7881c7 ifbt: add syslog debugging feature 2019-04-08 12:06:22 +02:00
Sukru Senli
1cec925bbb netmode: fix acl for netmodes 2019-04-02 13:04:27 +02:00
Sachin Singla
bd6aa7ed3d ifbt: change event name to wifi.fbt 2019-03-29 17:56:08 +01:00
Sukru Senli
4e3fbdb5b3 icwmp-4.0-2019-03-29 2019-03-29 17:30:56 +01:00
Anjan Chanda
02363930c1 Update feed [ iopsys ] package [ wifimngr ]
-------------------------------------------------------------------------------
* 1de666d match iftype in uci_wifi_get_interfaces function
-------------------------------------------------------------------------------
commit 1de666d20954b818c075c9166a005d1ae13526d6
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-03-29 14:49:03 +0100

    match iftype in uci_wifi_get_interfaces function

Base directory -> /
 wifimngr.c | 31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
2019-03-29 14:54:10 +01:00
Sukru Senli
c35f3b1ca1 Revert "netmode: disable wificontrol by default"
This reverts commit bcba464917.
2019-03-28 18:52:57 +01:00
Jakob Olsson
da88558c98 questd: update pkg to adapt to mobility domain id 2019-03-28 18:51:50 +01:00
Sachin Singla
3fa918aacc ifbt: fix issues in ifbt 2019-03-28 16:45:07 +01:00
Sachin Singla
406002c5b0 ifbt: fix ifbt issues 2019-03-28 12:13:06 +01:00
Anjan Chanda
e4df6d3814 Update feed [ iopsys ] package [ wifimngr ]
-------------------------------------------------------------------------------
* 4b4087d account for vifs in wildcard dumps
-------------------------------------------------------------------------------
commit 4b4087d3970258c2fd7e90e65df923e3f699189e
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-03-28 11:50:50 +0100

    account for vifs in wildcard dumps

Base directory -> /
 wifimngr.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 65 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
2019-03-28 11:56:37 +01:00
Anjan Chanda
52a8c3b217 Update feed [ iopsys ] package [ wifilife ]
-------------------------------------------------------------------------------
* 9a75b71 disable legacy_steer by default
* 47c680d don't btm steer if retry reached
-------------------------------------------------------------------------------
commit 9a75b717d3cd95d88e394f5bcd8b4006dfa450ba
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-03-28 10:35:00 +0100

    disable legacy_steer by default

Base directory -> /
 src/config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 47c680d59d1db7e2a4b801d3d7cef1829e29c4d6
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-03-28 09:21:37 +0100

    don't btm steer if retry reached

Base directory -> /
 src/agent.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
2019-03-28 11:56:00 +01:00
Sachin Singla
9c4252e918 add PMK_R0 for 11r 2019-03-28 10:41:35 +01:00
Sachin Singla
39d7ee1f1a increase inbd buffer 2019-03-28 10:29:55 +01:00
Sukru Senli
e446abffd3 ice-client: restrict access to ice user password 2019-03-27 18:05:51 +00:00
Jakob Olsson
a35497685b questd: update pkg to include wificontrol compilation fixes 2019-03-27 16:24:36 +01:00
Jakob Olsson
c364bb7f82 Revert "Revert "netmode: disable wificontrol by default""
This reverts commit 8c272d3613.
2019-03-27 16:12:54 +01:00
Jakob Olsson
0440496d16 Revert "questd: remove wificontrol"
This reverts commit 7513d32e91.
2019-03-27 16:12:51 +01:00
Jakob Olsson
981d4b0b7d questd: update pkg to include wificontrol re-addition to makefile 2019-03-27 16:12:39 +01:00
Jakob Olsson
7513d32e91 questd: remove wificontrol 2019-03-27 15:49:12 +01:00
Jakob Olsson
45c4d8dc39 questd: update pkg to include router.network refactor #17078 #17081
Primarily a router.network overhaul, but also minor router.system
info fix.
2019-03-27 15:47:46 +01:00
Jakob Olsson
1fa45afa52 wifilife: update pkg to include legacy steer options #17100 2019-03-27 12:35:50 +01:00
Sukru Senli
8c272d3613 Revert "netmode: disable wificontrol by default"
This reverts commit bcba464917.
2019-03-23 11:48:58 +01:00
Sukru Senli
8de301e38b wifilife: set dnsmasq lease hwmask according to mobility domain id 2019-03-23 11:47:34 +01:00
Jakob Olsson
f91e7063ca wifimngr: update pkg to include data model change to assoclist #17078 2019-03-21 13:10:19 +01:00
Sukru Senli
bcba464917 netmode: disable wificontrol by default 2019-03-21 11:29:57 +01:00
Jakob Olsson
b1d03ebb60 samba: use hex_filter when creating user and password #17065 2019-03-20 13:56:00 +01:00
Jakob Olsson
833e1b90c5 Revert "quest: update pkg to fix router.network for repeated clients"
This reverts commit f8857b208d.
2019-03-19 16:21:59 +01:00
Jakob Olsson
206370c994 netmode: update pkg removal of perror on fopen 2019-03-19 10:35:41 +01:00
Sukru Senli
ad4d329dc1 voice-client: reload asterisk upon ifup even if not bound to a specific interface 2019-03-19 08:44:14 +01:00
Jakob Olsson
f8857b208d quest: update pkg to fix router.network for repeated clients 2019-03-15 09:55:50 +01:00
Sachin Singla
f072c81d04 add EX400 master support 2019-03-14 14:17:27 +01:00
Jakob Olsson
7799804f1d wifilife: update pkg to include fix that exits on wifix radios timeout #16739 2019-03-13 10:14:07 +01:00
Jakob Olsson
6d5130e982 wifilife: update pkg hash to fix agent crash on cleaned timeouts #17005 2019-03-12 13:33:28 +01:00
Jakob Olsson
b08f86d209 netmode: run save/apply _wet_cfg through pre and post scripts #16601 2019-03-12 09:59:17 +01:00
Jakob Olsson
a9976f626b netmode: update pkg to include flashing led change #16963 2019-03-04 16:47:01 +01:00
Jakob Olsson
223f025b72 wifilife: update pkg to include minor memory leak fix 2019-03-04 12:25:21 +01:00
Jakob Olsson
c8ba536d59 netmode: update pkg ot include flashing leds during zero-touch #16963 2019-03-04 12:16:50 +01:00
Jakob Olsson
6781aad52e netmode: do ubus call commit owsd after writing to owsd config #16739
Daemons such as wifilife are dependent on owsd configuration. Wifilife
was started with the controller running and it was never being stopped,
despite owsd config being changed.
2019-02-25 12:38:27 +01:00
Jakob Olsson
133ab71018 samba: add hex filter to discard newline section or config #16885 2019-02-21 16:37:43 +01:00
Jakob Olsson
e3c43d892f Revert "samba: prevent mulitple lines from being written to an option in smb.conf"
This reverts commit 88291c196a.
2019-02-21 15:37:56 +01:00
Jakob Olsson
d9380968a1 Revert "samba: prevent multiple lines from being written from uci to smb.conf #16885"
This reverts commit 8784439985.
2019-02-21 15:37:52 +01:00
Jakob Olsson
8784439985 samba: prevent multiple lines from being written from uci to smb.conf #16885 2019-02-20 14:42:41 +01:00
Amin Ben Ramdhane
d1ad9dc34f icwmp-4.0-2019-02-19 2019-02-19 13:53:10 +01:00
Reidar Cederqvist
c430a0f15e ice-client: update to version 5.3.6 refs #16174 2019-02-14 08:34:45 +01:00
Jakob Olsson
800728c7aa owsd: wifilife: prevent procd crash loop error 2019-02-12 14:18:47 +01:00
Jakob Olsson
38668ee8d9 wifilife: add reload trigger on owsd.ubusproxy.enable change 2019-02-12 14:18:47 +01:00
Jakob Olsson
e9d00040a7 netmode: update pkg to include status method 2019-02-12 08:52:49 +01:00
Jakob Olsson
bc5fad2c76 wifilife: update pkg to include workaround for stale clients when roaming 2019-02-11 13:13:09 +01:00
Jakob Olsson
52ea555ffb wifimngr: update hash to include disconnect_sta function 2019-02-11 13:13:09 +01:00
Amin Ben Ramdhane
eeecaa27de icwmp-4.0-2019-02-07 2019-02-07 16:17:16 +01:00
22 changed files with 154 additions and 52 deletions

View File

@@ -9,7 +9,7 @@ PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=87ad01a06b7898ae45e94444e0caa7e2cc264cc8
PKG_SOURCE_VERSION:=6a311af7cd17fc410c27de3cfae33b658195fd0b
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@inteno.se>

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.5
BASE_PKG_VERSION:=5.3.6
PKG_RELEASE:=
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
export PKG_VERSION
###########################--RELEASE--################################
PKG_SOURCE_VERSION:=f522352178834ecb324319ef96b892d996ad1da6
PKG_SOURCE_VERSION:=94aab1532fef2caf2d65579614fc413252a517eb
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

@@ -9,6 +9,8 @@ uci -q set passwords.ice=usertype
uci -q set passwords.ice.password="\$WPAKEY"
uci -q del_list passwords.ice._access_w=root
uci -q add_list passwords.ice._access_w=root
uci -q del_list passwords.ice._access_r=root
uci -q add_list passwords.ice._access_r=root
uci -q commit passwords
uci show rpcd | grep username=.*ice.* >/dev/null || {

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=4.0-2019-02-01
PKG_VERSION:=4.0-2019-04-01
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8c80e76a66a56ea71dfff39220f03ef140b68a31
PKG_SOURCE_VERSION:=7faa875dcb825869c6bd942e140d2200e5e0dc0e
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2013 Inteno
# Copyright (C) 2018 iopsys Software Solutions AB
#
include $(TOPDIR)/rules.mk
@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ifbt
PKG_VERSION:=0.1
PKG_SOURCE_VERSION:=a0572079265293ed99dc4d69fd38528760d29be9
PKG_SOURCE_VERSION:=0286812ed8036dea758f904694dc416481fba64d
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ifbt.git
@@ -18,6 +18,22 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
TARGET_PLATFORM:=-DIOPSYS_BROADCOM
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
TARGET_PLATFORM:=-DIOPSYS_BROADCOM
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
TARGET_PLATFORM:=-DIOPSYS_MARVELL
else ifeq ($(CONFIG_TARGET_intel_mips),y)
TARGET_PLATFORM:=-DIOPSYS_INTEL
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
TARGET_PLATFORM:=-DIOPSYS_MEDIATEK
else
$(info (UNEXPECTED CONFIG TARGET))
endif
export TARGET_PLATFORM
define Package/ifbt
CATEGORY:=Utilities
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libwifi +libjson-c

View File

@@ -12,7 +12,7 @@ PKG_INSTALL:=1
PKG_SOURCE_PROTO=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/imonitor.git
PKG_SOURCE_VERSION:=532f4900862bcb45d8cd4bf37555fabda81750b6
PKG_SOURCE_VERSION:=cea60630cfac1d3c70f486acea6663d339b7d444
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
PKG_MAINTAINER:=Sartura Support for Inteno <support-inteno@sartura.hr>

View File

@@ -12,7 +12,7 @@ PKG_NAME:=inbd
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=b846ae0ff55284392de2c4d874851b33edd7a6c5
PKG_SOURCE_VERSION:=12755fccb8ef87965ac684d62d56e19e73a255bd
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd

15
iop/scripts/auto_feeds_conf.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
declare -a feed_list
function list_feeds {
jq '.feed[] | .name' feeds.conf
}
# Exported interface
function auto_feeds_conf {
echo "Function auto feeds conf"
echo "feed list:"
list_feeds
}
register_command "auto_feeds_conf" "Automatically update feeds"

View File

@@ -496,6 +496,7 @@ check_feeds()
for feed in `echo $feeds`
do
feed_hash=$(feeds_hash $feed)
[ -n "$feed_hash" ] || continue
if [ -d feeds/$feed ]; then
in_git=$(cd feeds/$feed; git rev-parse HEAD)

View File

@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=netmode
PKG_VERSION:=0.2.0
PKG_SOURCE_VERSION:=39998ad3e859a790cadcd921ff1c0e2d125528f5
PKG_SOURCE_VERSION:=9fa23664b3bdd963e4556f5921c9f9be1c9c578f
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/netmoded

View File

@@ -35,3 +35,4 @@ apply_wet_cfg()
rm /tmp/netmodecfg 2> /dev/null
}
apply_wet_cfg

View File

@@ -35,3 +35,4 @@ save_wet_cfg()
config_foreach parse_wet_cfg "wifi-iface"
}
save_wet_cfg

View File

@@ -1,7 +1,5 @@
#!/bin/sh
. /etc/netmodes/repeater_mtk_5g_up_dual_down/scripts/pre/save_wet_cfg.sh
. /etc/netmodes/repeater_mtk_5g_up_dual_down/scripts/post/apply_wet_cfg.sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
@@ -182,7 +180,7 @@ switch_netmode() {
run_netmode_scripts $curmode "pre"
logger -s -p user.info -t $0 "[netmode] Copying /etc/netmodes/$curmode in /etc/config" >/dev/console
save_wet_cfg
for file in $(ls /etc/netmodes/$curmode/); do
case "$file" in
DETAILS|scripts) continue ;;
@@ -190,7 +188,9 @@ switch_netmode() {
cp /etc/netmodes/$curmode/$file /etc/config/
done
sync
apply_wet_cfg
#commit owsd to reload all init.d scripts dependent on its config
ubus call uci commit '{"config":"owsd"}'
local reboot=$(uci -q get netmode.$curmode.reboot)
@@ -386,7 +386,9 @@ populate_netmodes() {
if json_select acl; then
_i=1
while json_get_var user $_i; do
uci del_list netmode.$mode._access_r="$user"
uci del_list netmode.$mode._access_w="$user"
uci add_list netmode.$mode._access_r="$user"
uci add_list netmode.$mode._access_w="$user"
_i=$((_i+1))
done

View File

@@ -308,10 +308,10 @@ start_service() {
procd_close_instance
}
stop_service()
{
service_stop ${PROG}
}
#stop_service()
#{
# service_stop ${PROG}
#}
reload_service() {
stop

View File

@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=3.1.40
PKG_SOURCE_VERSION:=0ee8f66b6ac1a87687b8a1e5fcd6694e2f9d8cae
PKG_SOURCE_VERSION:=9edeefb6942c1a806a82274d124d8889bfb4f8e7
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd

View File

@@ -11,6 +11,11 @@ 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
@@ -51,6 +56,30 @@ 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
@@ -80,11 +109,12 @@ smb_header() {
config_get description $1 description "Samba on ${hostname:-OpenWrt}"
config_get charset $1 charset "UTF-8"
name=`echo -e "$name" | head -1`
workgroup=`echo -e "$workgroup" | head -1`
description=`echo -e "$description" | head -1`
interfaces=`echo -e "$interfaces" | head -1`
charset=`echo -e "$charset" | head -1`
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" \
@@ -144,13 +174,22 @@ smb_add_share() {
path=$(readlink -f $path)
[ "${path:0:4}" == "/mnt" ] || path="/mnt/"
echo -e "\n[$name]\n\tpath = ${path%%\\n*}" >> /var/etc/smb.conf
[ -n "$users" ] && echo -e "\tvalid users = $users" | head -1 >> /var/etc/smb.conf
[ -n "$read_only" ] && echo -e "\tread only = $read_only" | head -1 >> /var/etc/smb.conf
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" | head -1 >> /var/etc/smb.conf
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" | head -1 >> /var/etc/smb.conf
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" | head -1 >> /var/etc/smb.conf
[ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" | head -1 >> /var/etc/smb.conf
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
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/smb.conf
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/smb.conf
[ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" >> /var/etc/smb.conf
}
start_service() {

View File

@@ -1,18 +1,19 @@
#!/bin/sh
[ "$ACTION" = ifup ] || exit 0
[ "$ACTION" = "ifup" -a "$(uci -q get network.$INTERFACE.is_lan)" != "1" ] || exit 0
config_load voice_client
config_get bindintf SIP bindintf
[ "$INTERFACE" == "$bindintf" ] || exit 0
[ -n "$bindintf" -a "$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:-::}"
sed -i "s/bindaddr=.*/bindaddr=$bindaddr/g" /etc/asterisk/sip.conf
[ -e /var/run/asterisk/asterisk.ctl ] && asterisk -rx "sip reload"
fi
bindaddr="${bindaddr:-::}"
sed -i "s/bindaddr=.*/bindaddr=$bindaddr/g" /etc/asterisk/sip.conf
[ -e /var/run/asterisk/asterisk.ctl ] && asterisk -rx "sip reload"

View File

@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=wifilife
PKG_VERSION:=1.0.2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=7abfdc2f5b3549d43899db7d8d9f22ccdbd141a7
PKG_SOURCE_VERSION:=9a75b717d3cd95d88e394f5bcd8b4006dfa450ba
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
ifeq ($(CONFIG_WIFILIFE_OPEN),y)
@@ -55,8 +55,7 @@ define Package/wifilife/install
$(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/997-wifilife-add-owsd-wifi \
$(1)/etc/uci-defaults/997-wifilife-add-owsd-wifi
$(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

View File

@@ -10,4 +10,13 @@ add_owsd_object_wifi() {
fi
}
add_dnsmasq_lease_hwmask() {
local ubusx="$(uci -q get owsd.ubusproxy.enable)"
if [ "$ubusx" == "1" ]; then
uci -q set dhcp.@dnsmasq[0].lease_hwmask='0x000000'
uci commit dhcp
fi
}
add_owsd_object_wifi
add_dnsmasq_lease_hwmask

View File

@@ -3,8 +3,10 @@
START=96
STOP=10
PROG=/usr/sbin/wifiagent
ENABLE=/tmp/owsd_enable
USE_PROCD=1
EXTRA_COMMANDS="enable_check"
start_service() {
procd_open_instance
@@ -16,15 +18,16 @@ start_service() {
config_load owsd
config_get enable ubusproxy enable
if [ "$enable" == "1" ]; then
echo $enable > $ENABLE
procd_set_param command ${PROG} -c -d -l -f -o /tmp/wificntlr.log
fi
procd_close_instance
}
stop_service()
{
service_stop ${PROG}
}
#stop_service()
#{
# service_stop ${PROG}
#}
reload_service() {
# procd_send_signal wifilife # use SIGHUP
@@ -38,6 +41,19 @@ reload_service() {
fi
}
service_triggers() {
procd_add_reload_trigger "wifilife"
enable_check() {
config_load owsd
config_get enable ubusproxy enable
prev=$(cat $ENABLE)
if [ "$enable" != "$prev" ]; then
echo $enable > $ENABLE
reload
fi
}
service_triggers() {
procd_add_config_trigger "config.change" "wifilife" /etc/init.d/wifilife reload
procd_add_config_trigger "config.change" "owsd" /etc/init.d/wifilife enable_check
}

View File

@@ -8,7 +8,7 @@ PKG_NAME:=wifimngr
PKG_VERSION:=1.0.2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=a6b9256971aee59bb1049c8ac439ecb51619c72a
PKG_SOURCE_VERSION:=c7228ea031f407580ff8e4801e0ba544aeadd050
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>