mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-24 11:05:02 +08:00
Compare commits
9 Commits
realtek
...
ps/old/ast
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
479f5ace1c | ||
|
|
e2458f9094 | ||
|
|
cc81f24afe | ||
|
|
b4311b9506 | ||
|
|
d709112cec | ||
|
|
30fcbbe797 | ||
|
|
01e874d94b | ||
|
|
27f11d321d | ||
|
|
a377af2ccd |
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
local usb_dir uVid uPid uMa uPr uSe bConf bNumConfs vendor product mdmtyp netdev comdev cdcdev ttydev interface usbno usbbr
|
||||
local usb_dir uVid uPid uMa uPr uSe bConf bNumConfs vendor product mdmtyp netdev comdev cdcdev ttydev usbno usbbr
|
||||
|
||||
sanitize() {
|
||||
sed -e 's/[[:space:]]\+$//; s/[[:space:]]\+/_/g' "$@"
|
||||
@@ -20,7 +20,6 @@ find_usb_attrs() {
|
||||
netdev=$(find $usb_dir -name wwan* | awk -F'/' '{print$NF}' | head -2 | tail -1)
|
||||
cdcdev=$(find $usb_dir -name cdc-wdm* | awk -F'/' '{print$NF}' | head -2 | tail -1)
|
||||
ttydev=$(ls $(find $usb_dir -name tty | head -2 | tail -1) | tail -1)
|
||||
interface=$(cat $usb_dir/interface)
|
||||
if [ -n "$cdcdev" ]; then
|
||||
comdev=$cdcdev
|
||||
mdmtyp=$(grep $uVid:$uPid /etc/modemdb | grep 'qmi\|mbim' | awk '{print$2}' | head -1)
|
||||
@@ -49,8 +48,6 @@ case "$usbbr" in
|
||||
*:*) usbbr=$(echo $DEVPATH | cut -d'/' -f6) ;;
|
||||
esac
|
||||
|
||||
#devno=$(basename $DEVPATH)
|
||||
|
||||
find_usb_attrs
|
||||
if [ "$ACTION" = add ]; then
|
||||
convert_to_mbim "$uVid:$uPid"
|
||||
@@ -58,9 +55,6 @@ if [ "$ACTION" = add ]; then
|
||||
if [ -n "$usbno" ] && [ -n "$usbbr" ]; then
|
||||
sed -i "/$usbno:$usbbr/ d" /var/usbnets
|
||||
echo $usbno:$usbbr $uVid:$uPid $uMa $uPr $netdev $comdev $mdmtyp $vendor $product >> /var/usbnets
|
||||
ubus send hotplug.usb "{'action': 'add', 'devpath': '$DEVPATH', 'manufacturer': '$uMa', 'product': '$uPr', 'serial': '$uSe', 'vendor_id': '$uVid', \
|
||||
'product_id': '$uPid', 'driver_interface': '$interface', 'driver': '$DRIVER', 'devtype': '$DEVTYPE'}"
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -68,7 +62,5 @@ fi
|
||||
if [ "$ACTION" = remove ]; then
|
||||
if [ -n "$usbno" ] && [ -n "$usbbr" ]; then
|
||||
sed -i "/$usbno:$usbbr/ d" /var/usbnets
|
||||
ubus send hotplug.usb "{'action': 'remove', 'devpath': '$DEVPATH', 'manufacturer': '$uMa', 'product': '$uPr', 'serial': '$uSe', 'vendor_id': '$uVid', \
|
||||
'product_id': '$uPid', 'driver_interface': '$interface', 'driver': '$DRIVER', 'devtype': '$DEVTYPE'}"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=asterisk18-mod
|
||||
PKG_VERSION:=1.8.10.1
|
||||
|
||||
PKG_SOURCE_VERSION:=ee99af0d91a2197529b13075d802ebc37e644e40
|
||||
PKG_SOURCE_VERSION:=ffa46ba1d5abf22fa83d0bd06ea56fe8e638dd43
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/asterisk-1.8.x
|
||||
|
||||
@@ -19,7 +19,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)-$(PKG_RELEASE).tar.
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
-include $(INCLUDE_DIR)/ltqtapi.mk
|
||||
include $(INCLUDE_DIR)/ltqtapi.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/asterisk18-mod/Default
|
||||
@@ -42,6 +42,9 @@ $(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 +libncurses +libpopt +libpthread +uci +ubus +zlib @!TARGET_avr32
|
||||
ifeq ($(CONFIG_PACKAGE_voice-client),y)
|
||||
DEPENDS+= +voice-client
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/asterisk18-mod/description
|
||||
@@ -119,7 +122,7 @@ endef
|
||||
define Package/asterisk18-mod-cdr
|
||||
$(call Package/asterisk18-mod/Default)
|
||||
TITLE:=CDR support
|
||||
DEPENDS:= asterisk18-mod +libsqlite3
|
||||
DEPENDS:= asterisk18-mod
|
||||
endef
|
||||
|
||||
define Package/asterisk18-mod-cdr/description
|
||||
@@ -188,6 +191,17 @@ $(call Package/asterisk18-mod/Default/description)
|
||||
support to Asterisk.
|
||||
endef
|
||||
|
||||
define Package/asterisk18-mod-chan-mobile
|
||||
$(call Package/asterisk18-mod/Default)
|
||||
TITLE:=Mobile channel support
|
||||
DEPENDS:= asterisk18-mod +bluez-libs
|
||||
endef
|
||||
|
||||
define Package/asterisk18-mod-chan-mobile/description
|
||||
$(call Package/asterisk18-mod/Default/description)
|
||||
This package provides the channel chan_mobile support to Asterisk.
|
||||
endef
|
||||
|
||||
define Package/asterisk18-mod-res-timing-timerfd
|
||||
$(call Package/asterisk18-mod/Default)
|
||||
TITLE:= Timerfd Timing Interface
|
||||
@@ -330,6 +344,14 @@ else
|
||||
--without-spandsp
|
||||
endif
|
||||
|
||||
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-chan-mobile),)
|
||||
CONFIGURE_ARGS+= \
|
||||
--with-bluetooth="$(STAGING_DIR)/usr"
|
||||
else
|
||||
CONFIGURE_ARGS+= \
|
||||
--without-bluetooth
|
||||
endif
|
||||
|
||||
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-res-srtp),)
|
||||
CONFIGURE_ARGS+= \
|
||||
--with-srtp="$(STAGING_DIR)/usr"
|
||||
@@ -373,13 +395,38 @@ CONFIGURE_ARGS+= \
|
||||
--with-sounds-cache="$(DL_DIR)" \
|
||||
--disable-xmldoc
|
||||
|
||||
# I've had strange errors with -fno-caller-saves
|
||||
# in global CFLAGS so revert it. /Ronny
|
||||
EXTRA_CFLAGS+= -O2 -fcaller-saves
|
||||
EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
|
||||
EXTRA_LDFLAGS+= $(TARGET_LDFLAGS)
|
||||
|
||||
ifeq ($(CONFIG_DEBUG),y)
|
||||
CONFIGURE_ARGS+= \
|
||||
--enable-dev-mode
|
||||
MENUSELECT_ARGS+= \
|
||||
--enable BETTER_BACKTRACES
|
||||
MENUSELECT_ARGS+= \
|
||||
--enable DEBUG_THREADS
|
||||
MENUSELECT_ARGS+= \
|
||||
--enable DONT_OPTIMIZE
|
||||
MENUSELECT_ARGS+= \
|
||||
--enable MALLOC_DEBUG
|
||||
#MENUSELECT_ARGS+= \
|
||||
# --disable LOADABLE_MODULES
|
||||
#MENUSELECT_ARGS+= \
|
||||
# --enable LOW_MEMORY
|
||||
#MENUSELECT_ARGS+= \
|
||||
# --enable STATIC_BUILD
|
||||
|
||||
DEBUG:=
|
||||
OPTIMIZE:=
|
||||
|
||||
#CONFIGURE_ARGS+= \
|
||||
# --enable-coverage
|
||||
else
|
||||
MENUSELECT_ARGS+= \
|
||||
--enable LOW_MEMORY
|
||||
DEBUG:=
|
||||
OPTIMIZE:=
|
||||
endif
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
@@ -391,6 +438,10 @@ endef
|
||||
define Build/Configure
|
||||
-rm $(PKG_BUILD_DIR)/menuselect.makeopts
|
||||
$(call Build/Configure/Default,,$(SITE_VARS))
|
||||
if test -n "$(MENUSELECT_ARGS)" ; then \
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)" menuselect.makeopts ; \
|
||||
(cd $(PKG_BUILD_DIR) && ./menuselect/menuselect $(MENUSELECT_ARGS)) ; \
|
||||
fi
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
@@ -398,7 +449,7 @@ define Build/Compile
|
||||
include/asterisk/version.h \
|
||||
include/asterisk/buildopts.h defaults.h \
|
||||
makeopts.embed_rules
|
||||
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
|
||||
ASTCFLAGS="$(EXTRA_CFLAGS)" \
|
||||
ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
||||
ASTVARLIBDIR="/usr/lib/asterisk" \
|
||||
@@ -406,8 +457,8 @@ define Build/Compile
|
||||
ASTKEYDIR="/usr/lib/asterisk" \
|
||||
ASTDBDIR="/usr/lib/asterisk" \
|
||||
NOISY_BUILD="1" \
|
||||
DEBUG="" \
|
||||
OPTIMIZE="" \
|
||||
DEBUG="$(DEBUG)" \
|
||||
OPTIMIZE="$(OPTIMIZE)" \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
all install samples
|
||||
endef
|
||||
@@ -418,6 +469,7 @@ define Build/InstallDev
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/asterisk-1.8/include/
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_voice-client),y)
|
||||
define Package/asterisk18-mod/conffiles
|
||||
/etc/asterisk/asterisk.conf
|
||||
/etc/asterisk/modules.conf
|
||||
@@ -432,14 +484,22 @@ define Package/asterisk18-mod/conffiles
|
||||
/etc/default/asterisk
|
||||
/etc/init.d/asterisk
|
||||
endef
|
||||
else
|
||||
define Package/asterisk18-mod/conffiles
|
||||
/etc/default/asterisk
|
||||
/etc/init.d/asterisk
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/asterisk18-mod/install
|
||||
$(INSTALL_DIR) $(1)/etc/asterisk/ssl
|
||||
ifneq ($(CONFIG_PACKAGE_voice-client),y)
|
||||
for f in asterisk extensions features \
|
||||
indications logger manager modules \
|
||||
sip sip_notify rtp; do \
|
||||
$(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
|
||||
done
|
||||
endif
|
||||
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
|
||||
for f in app_dial app_echo app_playback app_macro \
|
||||
chan_sip res_rtp_asterisk res_rtp_multicast \
|
||||
@@ -455,8 +515,6 @@ define Package/asterisk18-mod/install
|
||||
$(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||
$(INSTALL_BIN) ./files/asterisk.hotplug $(1)/etc/hotplug.d/iface/80-asterisk
|
||||
endef
|
||||
|
||||
define Package/asterisk18-mod-sounds/install
|
||||
@@ -554,6 +612,17 @@ define Package/asterisk18-mod-chan-gtalk/install
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
|
||||
endef
|
||||
|
||||
define Package/asterisk18-mod-chan-mobile/conffiles
|
||||
/etc/asterisk/chan_mobile.conf
|
||||
endef
|
||||
|
||||
define Package/asterisk18-mod-chan-mobile/install
|
||||
$(INSTALL_DIR) $(1)/etc/asterisk
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/chan_mobile.conf $(1)/etc/asterisk/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mobile.so $(1)/usr/lib/asterisk/modules/
|
||||
endef
|
||||
|
||||
define Package/asterisk18-mod-res-timing-timerfd/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_timing_timerfd.so $(1)/usr/lib/asterisk/modules/
|
||||
@@ -603,13 +672,17 @@ define Package/asterisk18-mod-chan-skinny/install
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_skinny.so $(1)/usr/lib/asterisk/modules/
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_voice-client),y)
|
||||
define Package/asterisk18-mod-chan-brcm/conffiles
|
||||
/etc/asterisk/brcm.conf
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/asterisk18-mod-chan-brcm/install
|
||||
$(INSTALL_DIR) $(1)/etc/asterisk
|
||||
ifneq ($(CONFIG_PACKAGE_voice-client),y)
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/brcm.conf $(1)/etc/asterisk/
|
||||
endif
|
||||
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_brcm.so $(1)/usr/lib/asterisk/modules/
|
||||
endef
|
||||
@@ -705,6 +778,7 @@ $(eval $(call BuildPackage,asterisk18-mod-cdr))
|
||||
$(eval $(call BuildPackage,asterisk18-mod-res-musiconhold))
|
||||
$(eval $(call BuildPackage,asterisk18-mod-res-voice))
|
||||
$(eval $(call BuildPackage,asterisk18-mod-chan-gtalk))
|
||||
$(eval $(call BuildPackage,asterisk18-mod-chan-mobile))
|
||||
$(eval $(call BuildPackage,asterisk18-mod-res-fax))
|
||||
$(eval $(call BuildPackage,asterisk18-mod-res-fax-spandsp))
|
||||
$(eval $(call BuildPackage,asterisk18-mod-res-timing-timerfd))
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$ACTION" = ifup ] || exit 0
|
||||
|
||||
config_load voice_client
|
||||
config_get bindintf SIP bindintf
|
||||
|
||||
[ "$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
|
||||
|
||||
@@ -3,15 +3,18 @@
|
||||
START=98
|
||||
STOP=10
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/functions/network.sh
|
||||
USE_PROCD=1
|
||||
NAME=asterisk
|
||||
PROG=/usr/sbin/asterisk
|
||||
DEFAULT=/etc/default/asterisk
|
||||
CONFDIR=/etc/asterisk
|
||||
|
||||
init_asterisk() {
|
||||
# do not start asterisk until the
|
||||
# router receives a default route
|
||||
while ! ip r | grep -q default; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
[ -d /var/run/asterisk ] || mkdir -p /var/run/asterisk
|
||||
[ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk
|
||||
@@ -39,8 +42,6 @@ start_service() {
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
asterisk -rx "config reload $CONFDIR/sip.conf"
|
||||
sleep 1
|
||||
asterisk -rx "core reload"
|
||||
asterisk -rx "dialplan reload"
|
||||
asterisk -rx "brcm reload"
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2016 inteno
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ated
|
||||
PKG_VERSION:=1.2.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=f614cba983d827d5185c60a6a5a35530621d44d2
|
||||
PKG_SOURCE_PROTO:=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)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
# support parallel build
|
||||
#PKG_BUILD_PARALLEL:=1
|
||||
|
||||
#re create configure scripts if not present.
|
||||
#PKG_FIXUP:=autoreconf
|
||||
|
||||
# run install target when cross compiling. basically, make install DESTDIR=$(PKG_INSTALL_DIR)
|
||||
# this way we don't need to pick out the resulting files from the build dir.
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ated
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Daemon for handling wifi calibration
|
||||
URL:=
|
||||
DEPENDS:= libc
|
||||
endef
|
||||
|
||||
define Package/ated/description
|
||||
Daemon for handling wifi calibration
|
||||
endef
|
||||
|
||||
#TARGET_CFLAGS += -I$(LINUX_DIR)/include -I$(LINUX_DIR)/arch/mips/include
|
||||
|
||||
MAKE_FLAGS += \
|
||||
v=2 \
|
||||
m=3
|
||||
|
||||
|
||||
#TARGET_CPPFLAGS := \
|
||||
# -I$(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx \
|
||||
# -I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
|
||||
# $(TARGET_CPPFLAGS)
|
||||
|
||||
# we donot wwant to have any install.
|
||||
define Build/Install/Default
|
||||
endef
|
||||
|
||||
define Package/ated/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ated $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ated))
|
||||
@@ -1,62 +0,0 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bashdb
|
||||
PKG_VERSION:=4.4-0.92
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
#PKG_SOURCE_URL:=http://sourceforge.net/projects/bashdb/files/bashdb/$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=@SF/bashdb/
|
||||
PKG_MD5SUM:=b72c17870bfab2fd791b1f6de4d79f9e
|
||||
#PKG_CAT:=zcat
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Bash script debugging utility.
|
||||
URL:=http://sourceforge.net/projects/bashdb/
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Bash script debugging utility.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \
|
||||
-I./src" \
|
||||
LIBS="$(TARGET_LDFLAGS)" \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)"
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bashdb $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/share
|
||||
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.sh $(1)/usr/share/$(PKG_NAME)/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.inc $(1)/usr/share/$(PKG_NAME)/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/init
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/init/*.sh $(1)/usr/share/$(PKG_NAME)/init/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/command
|
||||
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/command/show_sub
|
||||
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/command/set_sub
|
||||
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/command/info_sub
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/command/*.sh $(1)/usr/share/$(PKG_NAME)/command/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/command/show_sub/*.sh $(1)/usr/share/$(PKG_NAME)/command/show_sub/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/command/set_sub/*.sh $(1)/usr/share/$(PKG_NAME)/command/set_sub/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/command/info_sub/*.sh $(1)/usr/share/$(PKG_NAME)/command/info_sub/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/lib
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/*.sh $(1)/usr/share/$(PKG_NAME)/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,bashdb))
|
||||
81
bluez/Makefile
Normal file
81
bluez/Makefile
Normal file
@@ -0,0 +1,81 @@
|
||||
#
|
||||
# Copyright (C) 2006-2012 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bluez
|
||||
PKG_VERSION:=5.28
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/bluetooth
|
||||
PKG_MD5SUM:=bc20a8285530758c68f6a60e4ca62a15
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/bluez
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libpthread +libusb-compat +glib2 +dbus +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
|
||||
TITLE:=Bluetooth stack new version
|
||||
URL:=http://www.bluez.org/
|
||||
endef
|
||||
|
||||
define Package/bluez/conffiles
|
||||
/etc/config/bluetooth
|
||||
endef
|
||||
|
||||
TARGET_LDFLAGS+= \
|
||||
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib/libiconv-full/lib \
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-shared \
|
||||
--disable-cups \
|
||||
--enable-debug \
|
||||
--disable-test \
|
||||
--disable-obex \
|
||||
--disable-systemd \
|
||||
--disable-udev \
|
||||
--enable-tools \
|
||||
--enable-experimental \
|
||||
--enable-library \
|
||||
--disable-static \
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
LDFLAGS="$(TARGET_LDFLAGS) \
|
||||
-L$(ICONV_PREFIX)/lib \
|
||||
-L$(INTL_PREFIX)/lib -lm -lncurses" \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
endef
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/bluetooth
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth/*.h $(1)/usr/include/bluetooth
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.* $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
define Package/bluez/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/bluetooth
|
||||
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d
|
||||
$(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/bluetooth.conf $(1)/etc/dbus-1/system.d/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/bluetooth
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/* $(1)/usr/lib/bluetooth
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libblue* $(1)/usr/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,bluez))
|
||||
@@ -1,43 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2007-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bootchart2
|
||||
PKG_VERSION:=0.14.7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/mmeeks/bootchart.git
|
||||
PKG_SOURCE_VERSION:=3ab81137cafe25c2ca4bc3a5f322a63646f9ce8d
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/bootchart2
|
||||
SECTION:=base
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Bootchart2
|
||||
URL:=https://github.com/mmeeks/bootchart
|
||||
endef
|
||||
|
||||
define Package/bootchart2/description
|
||||
Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process.
|
||||
endef
|
||||
|
||||
define Package/bootchart2/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bootchart-collector $(1)/sbin
|
||||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
|
||||
|
||||
|
||||
$(eval $(call BuildPackage,bootchart2))
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
do_bootchart()
|
||||
{
|
||||
[ -f /dev/null ] || mknod /dev/null c 1 3
|
||||
mkdir -p /lib/bootchart/tmpfs
|
||||
echo "starting bootchart"
|
||||
/sbin/bootchart_run_preinit boot &
|
||||
}
|
||||
|
||||
boot_hook_add preinit_essential do_bootchart
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
bootchart_rootfs_pivot()
|
||||
{
|
||||
mount -o move /rom/lib/bootchart/tmpfs /lib/bootchart/tmpfs
|
||||
}
|
||||
|
||||
boot_hook_add preinit_mount_root bootchart_rootfs_pivot
|
||||
@@ -1,59 +0,0 @@
|
||||
#! /bin/sh
|
||||
# this is intended to be started in preinit.
|
||||
# 11_bootchart, starts it
|
||||
# 72_bootchart, fixup mount point after pivot
|
||||
#
|
||||
# program can be killed early with
|
||||
# bootchart_run_preinit stop
|
||||
|
||||
trap "stop; exit 0;" SIGINT SIGTERM
|
||||
|
||||
STOP_AFTER=250
|
||||
HZ=50
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "you need to specify start or stop"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
start()
|
||||
{
|
||||
/sbin/bootchart-collector $HZ &
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
echo "bootchart DUMP"
|
||||
|
||||
mkdir /tmp/bootchart
|
||||
/sbin/bootchart-collector --dump /tmp/bootchart
|
||||
cd /tmp/bootchart
|
||||
tar -zcf /tmp/bootchart.tgz header *.log
|
||||
cd /
|
||||
rm -rf /tmp/bootchart
|
||||
}
|
||||
|
||||
case $1 in
|
||||
boot) # secret option for preinit
|
||||
start
|
||||
sleep $STOP_AFTER
|
||||
# test to see if someone has manually killed us
|
||||
if [ -f /tmp/bootchart.tgz ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
stop
|
||||
;;
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
*)
|
||||
echo "you need to specify start or stop, not $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
diff --git a/pybootchartgui/draw.py b/pybootchartgui/draw.py
|
||||
index 7c3f60c..5c9f046 100644
|
||||
--- a/pybootchartgui/draw.py
|
||||
+++ b/pybootchartgui/draw.py
|
||||
@@ -63,6 +63,7 @@ AXIS_FONT_SIZE = 11
|
||||
LEGEND_FONT_SIZE = 12
|
||||
|
||||
# CPU load chart color.
|
||||
+CPU_SYS_COLOR = (0.65, 0.13, 0.36, 1.0)
|
||||
CPU_COLOR = (0.40, 0.55, 0.70, 1.0)
|
||||
# IO wait chart color.
|
||||
IO_COLOR = (0.76, 0.48, 0.48, 0.5)
|
||||
@@ -300,21 +301,19 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
|
||||
# render bar legend
|
||||
ctx.set_font_size(LEGEND_FONT_SIZE)
|
||||
|
||||
- draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, curr_y+20, leg_s)
|
||||
- draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, curr_y+20, leg_s)
|
||||
+ draw_legend_box(ctx, "CPU (user)", CPU_COLOR, off_x, curr_y+20, leg_s)
|
||||
+ draw_legend_box(ctx, "CPU (sys)", CPU_SYS_COLOR, off_x + 120, curr_y+20, leg_s)
|
||||
+ draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120 + 120 , curr_y+20, leg_s)
|
||||
|
||||
# render I/O wait
|
||||
chart_rect = (off_x, curr_y+30, w, bar_h)
|
||||
if clip_visible (clip, chart_rect):
|
||||
draw_box_ticks (ctx, chart_rect, sec_w)
|
||||
draw_annotations (ctx, proc_tree, trace.times, chart_rect)
|
||||
- draw_chart (ctx, IO_COLOR, True, chart_rect, \
|
||||
- [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], \
|
||||
- proc_tree, None)
|
||||
+ draw_chart (ctx, IO_COLOR, True, chart_rect, [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], proc_tree, None)
|
||||
# render CPU load
|
||||
- draw_chart (ctx, CPU_COLOR, True, chart_rect, \
|
||||
- [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], \
|
||||
- proc_tree, None)
|
||||
+ draw_chart (ctx, CPU_SYS_COLOR, True, chart_rect, [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], proc_tree, None)
|
||||
+ draw_chart (ctx, CPU_COLOR, True, chart_rect, [(sample.time, sample.user ) for sample in trace.cpu_stats], proc_tree, None)
|
||||
|
||||
curr_y = curr_y + 30 + bar_h
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.1
|
||||
PKG_SOURCE_URL:=git@private.inteno.se:brcmslic
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=837ec19e37650e424e77c921672a0806e198ba7b
|
||||
PKG_NAME:=brcmslic
|
||||
|
||||
|
||||
RSTRIP:=true
|
||||
export BUILD_DIR
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/brcmslic
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Brcmslic
|
||||
URL:=
|
||||
DEPENDS:=
|
||||
endef
|
||||
|
||||
define Package/brcmslic/description
|
||||
Brcmslic
|
||||
endef
|
||||
|
||||
|
||||
define Package/brcmslic/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/brcmslic $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/endpt $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,brcmslic))
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
config dect 'dect'
|
||||
option radio 'auto'
|
||||
|
||||
47
btle_alarm/Makefile
Normal file
47
btle_alarm/Makefile
Normal file
@@ -0,0 +1,47 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=btle_alarm
|
||||
PKG_VERSION:=1.0.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=b505d7ae1524a213ca3de7f8ee15a7d51c6bbbd5
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/btle_alarm
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(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/btle_alarm
|
||||
SECTION:=base
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Ethernet bridging configuration utility
|
||||
#DESCRIPTION:=This variable is obsolete. use the Package/name/description define instead!
|
||||
URL:=http://btle_alarm.sourceforge.net/
|
||||
DEPENDS:=+bluez +libncurses
|
||||
endef
|
||||
|
||||
define Package/btle_alarm/description
|
||||
Ethernet bridging configuration utility
|
||||
Manage ethernet bridging; a way to connect networks together to
|
||||
form a larger network.
|
||||
endef
|
||||
|
||||
define Package/btle_alarm/install
|
||||
|
||||
$(CP) ./files/* $(1)/
|
||||
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/btle_alarm $(1)/sbin/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_DATA) ./files/btle_alarm.conf $(1)/etc/config/btle_alarm
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d/
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,btle_alarm))
|
||||
2
btle_alarm/files/btle_alarm.conf
Normal file
2
btle_alarm/files/btle_alarm.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
config info 'Device'
|
||||
option mac 'D0:39:72:B6:23:D6'
|
||||
29
btle_alarm/files/etc/init.d/btle_alarm
Executable file
29
btle_alarm/files/etc/init.d/btle_alarm
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (C) 2009 OpenWrt.org
|
||||
#
|
||||
|
||||
START=99
|
||||
|
||||
start() {
|
||||
for i in down reset up;do
|
||||
hciconfig hci0 $i
|
||||
done
|
||||
mac=`uci get btle_alarm.Device.mac`
|
||||
if [ $? -eq 0 ];then
|
||||
hcitool lewladd $mac
|
||||
else
|
||||
hcitool lewladd D0:39:72:B6:43:8A
|
||||
hcitool lewladd D0:39:72:B6:18:AA
|
||||
fi
|
||||
sleep 1
|
||||
/sbin/btle_alarm &> /dev/null &
|
||||
echo $! > /tmp/btle_alarm.pid
|
||||
}
|
||||
|
||||
stop() {
|
||||
hciconfig hci0 down
|
||||
kill -9 `cat /tmp/btle_alarm.pid`
|
||||
rm /tmp/btle_alarm.pid
|
||||
sleep 1
|
||||
}
|
||||
@@ -10,16 +10,12 @@ USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
local enable=0
|
||||
local filter=0
|
||||
local filter=0
|
||||
|
||||
config_load catv
|
||||
config_get_bool enable catv enable 0
|
||||
config_get filter catv filter
|
||||
if [ $enable -eq 0 ]; then
|
||||
ubus call catv set-enable "{\"enable\":\"off\"}"
|
||||
else
|
||||
ubus call catv set-enable "{\"enable\":\"on\"}"
|
||||
fi
|
||||
config_load catv
|
||||
config_get enable catv enable
|
||||
config_get filter catv filter
|
||||
ubus call catv set-enable "{\"enable\":\"$enable\"}"
|
||||
ubus call catv set-filter "{\"filter\":\"$filter\"}"
|
||||
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.0.23
|
||||
PKG_VERSION:=1.0.24
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=90aff0da98c626d58201c14c34b3b3a64878ceee
|
||||
PKG_SOURCE_VERSION:=6ba403663bc9cfdb8f89fb34de367f0796d68552
|
||||
PKG_NAME:=dectmngr
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -11,10 +11,14 @@ PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.1.0
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr2
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=13da1568d57b8e6732dadc16de828d64c81906b8
|
||||
PKG_SOURCE_VERSION:=a51f8ed1b9178262777f73f7c275d3962f829c8a
|
||||
PKG_NAME:=dectmngr2
|
||||
|
||||
|
||||
LDFLAGS+= \
|
||||
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
|
||||
-Wl,-rpath-link=$(STAGING_DIR)/lib
|
||||
|
||||
RSTRIP:=true
|
||||
export BUILD_DIR
|
||||
|
||||
@@ -37,17 +41,11 @@ endef
|
||||
|
||||
|
||||
define Package/dectmngr2/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_DIR) $(1)/etc/dect/
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dectmngr2 $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/target.bin $(1)/etc/dect/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/nvs_default $(1)/etc/dect/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dect $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dectmngr-wrapper.sh $(1)/usr/sbin/
|
||||
$(CP) ./files/dect.config $(1)/etc/config/dect
|
||||
cp $(PKG_BUILD_DIR)/src/dectmngr2 $(1)/usr/bin/
|
||||
cp $(PKG_BUILD_DIR)/files/target.bin $(1)/etc/dect/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dectmngr2))
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
config dect 'dect'
|
||||
option radio 'auto'
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
config ENDPT_OPEN
|
||||
bool "Use pre-compiled version for Open SDK"
|
||||
default n
|
||||
@@ -11,7 +11,7 @@ PKG_NAME:=endptcfg
|
||||
PKG_VERSION:=0.2
|
||||
|
||||
PKG_SOURCE_VERSION:=1194b05278bd0945ca5c76436e56617b86871a65
|
||||
ifeq ($(CONFIG_ENDPT_OPEN),y)
|
||||
ifeq ($(CONFIG_BCM_OPEN),y)
|
||||
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_KERNEL_PROFILE)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
|
||||
@@ -37,7 +37,9 @@ TARGET_LDFLAGS += $(BCMKERNEL_DIR)/userspace/private/apps/vodsl/telephonyProfile
|
||||
$(BCMKERNEL_DIR)/userspace/private/apps/vodsl/bos/bos.o \
|
||||
-lpthread
|
||||
|
||||
ifeq ($(CONFIG_BRCM_SDK_VER_416040),y)
|
||||
TARGET_CFLAGS += -DFAKE_SSP
|
||||
endif
|
||||
|
||||
RSTRIP:=true
|
||||
export BUILD_DIR
|
||||
@@ -56,11 +58,7 @@ define Package/endptcfg/description
|
||||
Broadcom endpoint driver configuration application
|
||||
endef
|
||||
|
||||
define Package/endptcfg/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_ENDPT_OPEN),y)
|
||||
ifneq ($(CONFIG_BCM_OPEN),y)
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
$(TARGET_CONFIGURE_OPTS) LINUX_DIR=$(LINUX_DIR) LDFLAGS="$(TARGET_LDFLAGS)" CFLAGS="$(TARGET_CFLAGS) \
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2009-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=eventlog
|
||||
PKG_VERSION:=0.2.9
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/eventlog/0.2/
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
|
||||
PKG_MD5SUM:=76e3d7a0b8f335c12099e9b91191fbf1
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libeventlog
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=A new API to format and send structured log messages.
|
||||
endef
|
||||
|
||||
define Package/eventlog/description
|
||||
A new API to format and send structured log messages. It supports multiple message
|
||||
representations (plain, XML attributes and XML tags) and multiple output methods
|
||||
(local syslogd).
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/eventlog $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.{a,so*} $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/eventlog.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libeventlog/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libeventlog))
|
||||
@@ -1,54 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2016 Nikil Mehta <nikil.mehta@gmail.com>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fping
|
||||
PKG_VERSION:=4.0
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://fping.org/dist/
|
||||
PKG_HASH:=67eb4152b98ad34f99d2eec4e1098a0bb52caf13c0c89cd147349d08190fe8ce
|
||||
|
||||
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
|
||||
PKG_LICENSE:=BSD-4-Clause
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/fping
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=sends ICMP ECHO_REQUEST packets to network hosts
|
||||
URL:=http://fping.org/
|
||||
endef
|
||||
|
||||
|
||||
define Package/fping/description
|
||||
fping is a ping like program which uses the Internet Control Message Protocol
|
||||
(ICMP) echo request to determine if a target host is responding. fping
|
||||
differs from ping in that you can specify any number of targets on the command
|
||||
line, or specify a file containing the lists of targets to ping. Instead of
|
||||
sending to one target until it times out or replies, fping will send out a
|
||||
ping packet and move on to the next target in a round-robin fashion.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS+= \
|
||||
--enable-ipv4 \
|
||||
--enable-ipv6
|
||||
|
||||
TARGET_CFLAGS += -std=gnu99
|
||||
|
||||
define Package/fping/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fping $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,fping))
|
||||
3
gigaset-elements/.gitignore
vendored
3
gigaset-elements/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
|
||||
git-src
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gigaset-elements
|
||||
|
||||
PKG_VERSION:=2.4.2
|
||||
# PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
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)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=aa906b37062b6d7937a9c0f8e7b62b32afe4bdeb
|
||||
|
||||
|
||||
PKG_MAINTAINER:=Magier Marcin, Figlarek Piotr
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
######################################################
|
||||
|
||||
define Package/gigaset-elements
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libjson-c +libcurl +libpthread
|
||||
TITLE:=Gigaset elements
|
||||
endef
|
||||
|
||||
######################################################
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) all
|
||||
endef
|
||||
|
||||
|
||||
|
||||
define Package/gigaset-elements/install
|
||||
$(CP) -r $(PKG_BUILD_DIR)/sysroot_common/* $(1)/
|
||||
$(CP) -r $(PKG_BUILD_DIR)/sysroot_$(CONFIG_ARCH)/* $(1)/
|
||||
endef
|
||||
|
||||
|
||||
|
||||
define Package/gigaset-elements/preinst
|
||||
#!/bin/sh
|
||||
mkdir -p $${IPKG_INSTROOT}/usr/gigaset/data/cert
|
||||
mkdir -p $${IPKG_INSTROOT}/usr/gigaset/data/fw
|
||||
endef
|
||||
|
||||
|
||||
define Package/gigaset-elements/postrm
|
||||
#!/bin/sh
|
||||
rm -rf $${IPKG_INSTROOT}/usr/gigaset/data
|
||||
rm -rf /usr/share/gigaset
|
||||
endef
|
||||
|
||||
|
||||
######################################################
|
||||
|
||||
$(eval $(call BuildPackage,gigaset-elements))
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
config ICE_OPEN
|
||||
bool "Use pre-compiled version for Open SDK"
|
||||
default n
|
||||
@@ -5,10 +5,6 @@ PKG_NAME:=ice-client
|
||||
|
||||
CFMODULES:=$(filter CONFIG_PACKAGE_$(PKG_NAME)-%,$(.VARIABLES))
|
||||
CFMODULES:=$(subst CONFIG_PACKAGE_$(PKG_NAME)-,,$(CFMODULES))
|
||||
|
||||
#CFMODULES:=$(CFMODULES) webaccess texec iperf
|
||||
#CFMODULES:=$(sort $(CFMODULES))
|
||||
|
||||
$(info Building package: $(PKG_NAME))
|
||||
$(info Building with additional modules: $(CFMODULES))
|
||||
export CFMODULES
|
||||
@@ -19,33 +15,32 @@ export PLATFORM_INCLUDE:=platforms/iopsys/build.mk
|
||||
|
||||
export DATE:=$(shell date +%Y-%m-%d-%H-%M-%S)
|
||||
export LOGIN:=$(shell whoami)
|
||||
BASE_PKG_VERSION:=5.0.0
|
||||
PKG_RELEASE:=RC7
|
||||
BASE_PKG_VERSION:=3.4.1
|
||||
PKG_RELEASE:=RC8
|
||||
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
|
||||
export PKG_VERSION
|
||||
|
||||
###########################--RELEASE--################################
|
||||
|
||||
PKG_SOURCE_VERSION:=11a77f1e9ccc0d591ca69aeab9663e9ec4727b08
|
||||
ifeq ($(CONFIG_ICE_OPEN),y)
|
||||
TARGET_PROFILE=$(shell echo $(CONFIG_TARGET_BOARD) | sed s/\"//g)
|
||||
PKG_SOURCE_URL:=ssh://git@private.inteno.se/ice-client.git
|
||||
PKG_SOURCE_VERSION:=ecad8b60183b43ecf86543c0c29db46cda8aae29
|
||||
ifeq ($(CONFIG_BCM_OPEN),y)
|
||||
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_KERNEL_PROFILE)-$(BASE_PKG_VERSION)$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(TARGET_PROFILE)-$(BASE_PKG_VERSION)$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
#PKG_NAME:=ice-client-open
|
||||
else
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git@private.inteno.se:ice-client.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(BASE_PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=ssh://git@private.inteno.se/ice-client.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BASE_PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(BASE_PKG_VERSION)-$(PKG_RELEASE).tar.gz
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BASE_PKG_VERSION)
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(BASE_PKG_VERSION)
|
||||
endif
|
||||
|
||||
|
||||
###########################--RELEASE--################################
|
||||
|
||||
#include $(INCLUDE_DIR)/uclibc++.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ice-client/Default
|
||||
@@ -58,11 +53,8 @@ define Package/ice-client
|
||||
$(call Package/ice-client/Default)
|
||||
TITLE:=ice-client
|
||||
MENU:=1
|
||||
DEPENDS:=+libopenssl +libstdcpp +libubus +ubus +ubusd +jshn +libubox +libpthread
|
||||
endef
|
||||
|
||||
define Package/ice-client/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
DEPENDS:=+libopenssl +libstdcpp +libubus +ubus +ubusd +jshn +libubox
|
||||
DEFAULT:=y
|
||||
endef
|
||||
|
||||
###########################--DEVELOPMENT--################################
|
||||
@@ -78,7 +70,7 @@ endef
|
||||
# PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(BASE_PKG_VERSION)
|
||||
#
|
||||
#
|
||||
# These settings allow you to specify a source folder where your source code is located
|
||||
# These settings allow you to specify a soruce folder where your source code is located
|
||||
# This avoids having to tar-zip or fetch from git each time
|
||||
# Changes can be done in your sources while the build is performed somewhere else
|
||||
# If you forget some settings, your source folder will be deleted!!! So be carefull and
|
||||
@@ -87,6 +79,7 @@ endef
|
||||
#define Build/Prepare
|
||||
# rm -rf $(PKG_BUILD_DIR)
|
||||
# ln -s /home/erik/Desktop/ice-client $(PKG_BUILD_DIR)
|
||||
## ln -s /home/erik/Desktop/checkCompilation/iopsys-client $(PKG_BUILD_DIR)
|
||||
#endef
|
||||
|
||||
###########################--DEVELOPMENT--################################
|
||||
@@ -101,7 +94,7 @@ endef
|
||||
# command to copy the binary file from its current location (in our case the build
|
||||
# directory) to the install directory.
|
||||
|
||||
ifeq ($(CONFIG_ICE_OPEN),y)
|
||||
ifeq ($(CONFIG_BCM_OPEN),y)
|
||||
define Build/Compile
|
||||
endef
|
||||
else
|
||||
@@ -129,7 +122,7 @@ fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_ICE_OPEN),y)
|
||||
ifeq ($(CONFIG_BCM_OPEN),y)
|
||||
define Package/ice-client/install
|
||||
$(INSTALL_DIR) $(1)/bin
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
@@ -144,7 +137,7 @@ define Package/ice-client/install
|
||||
$(CP) $(PKG_BUILD_DIR)/core/ice $(1)/bin
|
||||
$(CP) $(PKG_BUILD_DIR)/modules/system/ubusevent/obj/iopsys/ubusevent $(1)/bin
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/core/lib/{systemService.so.1.0.1,libconfStore.so.1,networkService.so.1.0.1,packageService.so.1.0.1,monitorService.so.1.0.1,iperfService.so.1.0.1,logService.so.1.0.1,texecService.so.1.0.1,webaccessService.so.1.0.1} $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/core/lib/{systemService.so.1.0.1,libconfStore.so.1,networkService.so.1.0.1,packageService.so.1.0.1,monitorService.so.1.0.1,iperfService.so.1.0.1,logService.so.1.0.1} $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/wsice/obj/iopsys/libwsice.so $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/bin/ifs/iperf/execute
|
||||
$(INSTALL_DIR) $(1)/bin/ifs/iperf/progress
|
||||
@@ -154,15 +147,12 @@ define Package/ice-client/install
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/etc/config/ice $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/iopsys
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/server.ini $(1)/etc/iopsys
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/defaults.ini $(1)/etc/iopsys
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/modify.ini $(1)/etc/iopsys
|
||||
$(INSTALL_DIR) $(1)/etc/iopsys/certificates
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/cert_server_ca.pem $(1)/etc/iopsys/certificates
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/inteno_root_ca.pem $(1)/etc/iopsys/certificates
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/ice-client $(1)/etc/init.d/ice-client
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults/
|
||||
$(CP) ./files/ice-client.uci_default $(1)/etc/uci-defaults/95-ice-client
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -173,14 +163,14 @@ cp /tmp/iopsysserver.ini /etc/iopsys/server.ini
|
||||
rm -f /tmp/iopsysserver.ini
|
||||
cp /tmp/ice.back /etc/config/ice
|
||||
rm -f /tmp/ice.back
|
||||
if [ -f "/etc/rc.d/S98ice-client" ]; then
|
||||
/etc/init.d/ice-client restart
|
||||
if [ -f "/etc/rc.d/S99ice-client" ]; then
|
||||
/etc/init.d/ice-client start
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
# Additional modules
|
||||
ifneq ($(CONFIG_ICE_OPEN),y)
|
||||
ifneq ($(CONFIG_BCM_OPEN),y)
|
||||
# Camerawatch
|
||||
define Package/ice-client-camerawatch
|
||||
$(call Package/ice-client/Default)
|
||||
@@ -493,7 +483,7 @@ endef
|
||||
define Package/ice-client-fileme
|
||||
$(call Package/ice-client/Default)
|
||||
TITLE:=FileMe
|
||||
DEPENDS+= +lighttpd +lighttpd-mod-webdav +lighttpd-mod-setenv +lighttpd-mod-userdir +samba2-client +samba2-common +libpcre +libltdl +libxml2
|
||||
DEPENDS+= +lighttpd +samba2-client
|
||||
endef
|
||||
|
||||
define Package/ice-client-fileme/description
|
||||
@@ -894,103 +884,6 @@ fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
# texec
|
||||
define Package/ice-client-texec
|
||||
$(call Package/ice-client/Default)
|
||||
TITLE:=texec
|
||||
DEPENDS+=
|
||||
endef
|
||||
|
||||
define Package/ice-client-texec/description
|
||||
remote script execution module for ice-client
|
||||
endef
|
||||
|
||||
define Package/ice-client-texec/prerm
|
||||
#!/bin/sh
|
||||
if [ ! -f "/tmp/ice.pid" ] ; then exit 0 ; fi
|
||||
PROC_ID=$$(cat /tmp/ice.pid)
|
||||
PROC_EXISTS=$$(/usr/bin/pgrep -P $${PROC_ID})
|
||||
if [ -n "$$PROC_EXISTS" ]; then
|
||||
read -t 1 <>/tmp/cfout
|
||||
echo "system moduleRemove topic=tExecMgr" > /tmp/cfin
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/ice-client-texec/preinst
|
||||
#!/bin/sh
|
||||
if [ ! -f "/tmp/ice.pid" ] ; then exit 0 ; fi
|
||||
PROC_ID=$$(cat /tmp/ice.pid)
|
||||
PROC_EXISTS=$$(/usr/bin/pgrep -P $${PROC_ID})
|
||||
if [ -n "$$PROC_EXISTS" ]; then
|
||||
read -t 1 <>/tmp/cfout
|
||||
echo "system moduleRemove topic=tExecMgr" > /tmp/cfin
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/ice-client-texec/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/core/lib/texecService.so.1.0.1 $(1)/usr/lib
|
||||
endef
|
||||
|
||||
define Package/ice-client-texec/postinst
|
||||
#!/bin/sh
|
||||
read -t 1 <>/tmp/cfout
|
||||
if [ -f /tmp/ice.pid ]; then
|
||||
echo "system moduleAdd file=texecService.so.1.0.1" package="ice-client-texec" > /tmp/cfin
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
# webaccess
|
||||
define Package/ice-client-webaccess
|
||||
$(call Package/ice-client/Default)
|
||||
TITLE:=webaccess
|
||||
DEPENDS+=
|
||||
endef
|
||||
|
||||
define Package/ice-client-webaccess/description
|
||||
remote script execution module for ice-client
|
||||
endef
|
||||
|
||||
define Package/ice-client-webaccess/prerm
|
||||
#!/bin/sh
|
||||
if [ ! -f "/tmp/ice.pid" ] ; then exit 0 ; fi
|
||||
PROC_ID=$$(cat /tmp/ice.pid)
|
||||
PROC_EXISTS=$$(/usr/bin/pgrep -P $${PROC_ID})
|
||||
if [ -n "$$PROC_EXISTS" ]; then
|
||||
read -t 1 <>/tmp/cfout
|
||||
echo "system moduleRemove topic=webAccess" > /tmp/cfin
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/ice-client-webaccess/preinst
|
||||
#!/bin/sh
|
||||
if [ ! -f "/tmp/ice.pid" ] ; then exit 0 ; fi
|
||||
PROC_ID=$$(cat /tmp/ice.pid)
|
||||
PROC_EXISTS=$$(/usr/bin/pgrep -P $${PROC_ID})
|
||||
if [ -n "$$PROC_EXISTS" ]; then
|
||||
read -t 1 <>/tmp/cfout
|
||||
echo "system moduleRemove topic=webAccess" > /tmp/cfin
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/ice-client-webaccess/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/core/lib/webaccessService.so.1.0.1 $(1)/usr/lib
|
||||
endef
|
||||
|
||||
define Package/ice-client-webaccess/postinst
|
||||
#!/bin/sh
|
||||
read -t 1 <>/tmp/cfout
|
||||
if [ -f /tmp/ice.pid ]; then
|
||||
echo "system moduleAdd file=webaccessService.so.1.0.1" package="ice-client-webaccess" > /tmp/cfin
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
# bmspeedtest
|
||||
define Package/ice-client-bcmspeedmgr
|
||||
$(call Package/ice-client/Default)
|
||||
@@ -1005,26 +898,16 @@ endef
|
||||
define Package/ice-client-bcmspeedmgr/install
|
||||
$(INSTALL_DIR) $(1)/bin
|
||||
$(CP) $(PKG_BUILD_DIR)/daemons/bcmspeedmgr/obj/iopsys/bcmspeedmgr $(1)/bin
|
||||
$(CP) $(PKG_BUILD_DIR)/daemons/bcmspeedmgr/obj/iopsys/speedsvc $(1)/bin
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(CP) $(PKG_BUILD_DIR)/platforms/iopsys/bcmspeedtestservice $(1)/etc/init.d/bcmspeedtestservice
|
||||
endef
|
||||
|
||||
define Package/ice-client-bcmspeedmgr/postinst
|
||||
#!/bin/sh
|
||||
/etc/init.d/bcmspeedtestservice stop
|
||||
/etc/init.d/bcmspeedtestservice start
|
||||
exit 0
|
||||
endef
|
||||
|
||||
endif
|
||||
|
||||
# This line executes the necessary commands to compile our program.
|
||||
# The above define directives specify all the information needed, but this
|
||||
# line calls BuildPackage which in turn actually uses this information to
|
||||
# build a package.
|
||||
$(eval $(call BuildPackage,ice-client))
|
||||
ifneq ($(CONFIG_ICE_OPEN),y)
|
||||
ifneq ($(CONFIG_BCM_OPEN),y)
|
||||
$(eval $(call BuildPackage,ice-client-guest))
|
||||
$(eval $(call BuildPackage,ice-client-camerawatch))
|
||||
$(eval $(call BuildPackage,ice-client-openvpn))
|
||||
@@ -1039,7 +922,5 @@ $(eval $(call BuildPackage,ice-client-rework))
|
||||
$(eval $(call BuildPackage,ice-client-sip))
|
||||
$(eval $(call BuildPackage,ice-client-monitor))
|
||||
$(eval $(call BuildPackage,ice-client-gigaset))
|
||||
$(eval $(call BuildPackage,ice-client-texec))
|
||||
$(eval $(call BuildPackage,ice-client-bcmspeedmgr))
|
||||
$(eval $(call BuildPackage,ice-client-webaccess))
|
||||
endif
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
grep -rq "^ice:" /etc/passwd || {
|
||||
adduser -D -H -s /bin/false ice
|
||||
uci -q delete passwords.ice
|
||||
uci -q set passwords.ice=usertype
|
||||
uci -q set passwords.ice.password="\$WPAKEY"
|
||||
uci -q add_list passwords.ice._access_r=root
|
||||
uci -q commit passwords
|
||||
}
|
||||
|
||||
uci show rpcd | grep username=.*ice.* >/dev/null || {
|
||||
cat >> /etc/config/rpcd << EOF
|
||||
|
||||
config login
|
||||
option username 'ice'
|
||||
option password '\$p\$ice'
|
||||
list _access_r 'none'
|
||||
list write 'user-user'
|
||||
list write 'juci-broadcom-dsl'
|
||||
list write 'juci-broadcom-dsl-admin'
|
||||
list write 'juci-broadcom-ethernet'
|
||||
list write 'juci-broadcom-iptv'
|
||||
list write 'juci-broadcom-vlan'
|
||||
list write 'juci-broadcom-vlan-admin'
|
||||
list write 'juci-wireless'
|
||||
list write 'juci-wireless-admin'
|
||||
list write 'juci-catv'
|
||||
list write 'juci-ddns'
|
||||
list write 'juci-diagnostics'
|
||||
list write 'juci-dnsmasq-dhcp'
|
||||
list write 'juci-dropbear'
|
||||
list write 'juci-ethernet'
|
||||
list write 'juci-event'
|
||||
list write 'juci-firewall-fw3'
|
||||
list write 'juci-iconnect'
|
||||
list write 'juci-igmpinfo'
|
||||
list write 'juci-inteno-backup'
|
||||
list write 'juci-inteno-multiwan'
|
||||
list write 'juci-inteno-provisioning'
|
||||
list write 'juci-inteno-qos'
|
||||
list write 'juci-inteno-voice-client'
|
||||
list write 'juci-minidlna'
|
||||
list write 'juci-mod-status'
|
||||
list write 'juci-mod-system'
|
||||
list write 'juci-natalie-dect'
|
||||
list write 'juci-netmode'
|
||||
list write 'juci-network-netifd'
|
||||
list write 'juci-owsd'
|
||||
list write 'juci-printer'
|
||||
list write 'juci-realtime-graphs'
|
||||
list write 'juci-samba'
|
||||
list write 'juci-sfp'
|
||||
list write 'juci-snmpd'
|
||||
list write 'juci-sysupgrade'
|
||||
list write 'juci-uhttpd'
|
||||
list write 'juci-upnp'
|
||||
list write 'juci-usb'
|
||||
list write 'core'
|
||||
list write 'unauthenticated'
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2016 Inteno Broadband AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icgroupd
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=0
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_MAINTAINER:=Inteno Broadband AB
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/icgroupd
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
TITLE:=Inteno cgroup daemon
|
||||
DEPENDS:=+uci +busybox
|
||||
endef
|
||||
|
||||
define Package/icgroupd/description
|
||||
This package contains Intenos cgroup daemon and associated
|
||||
configuration and startup scripts.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
define Package/icgroupd/install
|
||||
$(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d $(1)/etc/config
|
||||
|
||||
$(INSTALL_CONF) ./files/cgroups.config $(1)/etc/config/cgroups
|
||||
$(INSTALL_BIN) ./files/cgroups.init $(1)/etc/init.d/cgroups
|
||||
$(INSTALL_BIN) ./files/cgroupd $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,icgroupd))
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
CGBASEDIR=$1
|
||||
CGCONFIG=$2
|
||||
[ -n "$CGBASEDIR" -a -n "$CGCONFIG" ] || exit 1
|
||||
|
||||
[ -r /lib/functions.sh ] || exit 1
|
||||
. /lib/functions.sh
|
||||
|
||||
CGPROCMAP=/tmp/cgprocmap
|
||||
CGPERIOD=3s
|
||||
|
||||
DBGLOG=/tmp/cgroupd.log
|
||||
DEBUG=0
|
||||
|
||||
|
||||
add_to_procmap () {
|
||||
local name_grp=$1
|
||||
local name grp
|
||||
|
||||
name=$(echo $name_grp |awk -F= '{print $1}')
|
||||
grp=$(echo $name_grp |awk -F= '{print $2}')
|
||||
|
||||
echo "($name) $grp" >> $CGPROCMAP
|
||||
}
|
||||
|
||||
# Read configuration file and create process:group look-up table
|
||||
# in /tmp file
|
||||
read_config () {
|
||||
local enab
|
||||
|
||||
config_load $CGCONFIG
|
||||
|
||||
config_get enab cgroups enabled "1"
|
||||
[ $enab -eq 0 ] && exit 1
|
||||
|
||||
config_get CGDEFGROUP cgroups defgroup "_undef_"
|
||||
[ "$CGDEFGROUP" == "_undef_" ] && exit 1
|
||||
[ "$DEBUG" == "1" ] && echo "default $CGDEFGROUP" >> $DBGLOG
|
||||
|
||||
echo -n '' > $CGPROCMAP
|
||||
config_list_foreach procmap procmap add_to_procmap
|
||||
[ "$DEBUG" == "1" ] && cat $CGPROCMAP >> $DBGLOG
|
||||
}
|
||||
|
||||
# Move all process except init from cgroup root to cgroups according
|
||||
# to /tmp look-up table
|
||||
move_wild_procs () {
|
||||
local wild_procs=$(cat $CGBASEDIR/cgroup.procs)
|
||||
local pid name grp
|
||||
|
||||
for pid in $wild_procs; do
|
||||
|
||||
[ $pid -eq 1 ] && continue
|
||||
if [ -d /proc/$pid ]; then
|
||||
|
||||
name=$(awk '{print $2}' /proc/$pid/stat)
|
||||
grp=$(awk "\$1==\"$name\" {print \$2}" $CGPROCMAP)
|
||||
|
||||
[ "$grp" == "." ] && continue
|
||||
[ -n "$grp" ] || grp=$CGDEFGROUP
|
||||
|
||||
[ "$DEBUG" == "1" ] && \
|
||||
echo "Moving proc $pid $name to $grp" >> $DBGLOG
|
||||
echo $pid > $CGBASEDIR/$grp/cgroup.procs
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
[ "$DEBUG" == "1" ] && echo "$0 started $(date)" >> $DBGLOG
|
||||
read_config
|
||||
while true; do
|
||||
move_wild_procs
|
||||
sleep $CGPERIOD
|
||||
done
|
||||
@@ -1,48 +0,0 @@
|
||||
config cgroups cgroups
|
||||
option enabled 1
|
||||
option defgroup iopsys/normal
|
||||
|
||||
config cgroup _root_
|
||||
# list option cpu.rt_runtime_us=50000
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup iopsys
|
||||
list option cpu.shares=4096
|
||||
# list option cpu.rt_runtime_us=40000
|
||||
list option memory.limit_in_bytes=-1
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup iopsys_normal
|
||||
list option cpu.shares=1024
|
||||
# list option cpu.rt_runtime_us=10000
|
||||
list option memory.limit_in_bytes=-1
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup iopsys_high
|
||||
list option cpu.shares=4096
|
||||
# list option cpu.rt_runtime_us=30000
|
||||
list option memory.limit_in_bytes=-1
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup 3prt
|
||||
list option cpu.shares=1024
|
||||
# list option cpu.rt_runtime_us=10000
|
||||
list option memory.limit_in_bytes=75M
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup 3prt_normal
|
||||
list option cpu.shares=1024
|
||||
# list option cpu.rt_runtime_us=2500
|
||||
list option memory.limit_in_bytes=75M
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup 3prt_high
|
||||
list option cpu.shares=4096
|
||||
# list option cpu.rt_runtime_us=7500
|
||||
list option memory.limit_in_bytes=75M
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config procmap procmap
|
||||
list procmap kthreadd=.
|
||||
list procmap minidlna=3prt/normal
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=01
|
||||
USE_PROCD=1
|
||||
PROCD_DEBUG=1
|
||||
NAME=cgroupd
|
||||
|
||||
CGBASEDIR=/sys/fs/cgroup
|
||||
CGCONFIG="cgroups"
|
||||
|
||||
DBGLOG=/tmp/cginit.log
|
||||
DEBUG=0
|
||||
|
||||
|
||||
cgroupinit_set_knob_value () {
|
||||
local knob_val=$1
|
||||
local dir=$2
|
||||
local knob val
|
||||
|
||||
knob=$(echo $knob_val |awk -F= '{print $1}')
|
||||
val=$(echo $knob_val |awk -F= '{print $2}')
|
||||
/bin/echo $val > $CGBASEDIR/$dir/$knob
|
||||
[ "$DEBUG" == "1" ] && \
|
||||
echo "/bin/echo $val > $CGBASEDIR/$dir/$knob (ret=$?)" >> $DBGLOG
|
||||
}
|
||||
|
||||
cgroupinit_create_group () {
|
||||
local cgrp=$1
|
||||
local dir
|
||||
|
||||
[ "$DEBUG" == "1" ] && echo "Create group $cgrp:" >> $DBGLOG
|
||||
if [ "$cgrp" == "_root_" ]; then
|
||||
dir=.
|
||||
else
|
||||
dir=$(echo $cgrp |tr '_' '/')
|
||||
|
||||
if [ ! -d $CGBASEDIR/$dir ]; then
|
||||
mkdir $CGBASEDIR/$dir
|
||||
[ "$DEBUG" == "1" ] && \
|
||||
echo "mkdir $CGBASEDIR/$dir (ret=$?)" >> $DBGLOG
|
||||
fi
|
||||
fi
|
||||
|
||||
config_list_foreach $cgrp option cgroupinit_set_knob_value $dir
|
||||
}
|
||||
|
||||
cgroupinit_configure_cgroups () {
|
||||
local enab defgrp
|
||||
|
||||
[ "$DEBUG" == "1" ] && echo "$0 started $(date)" >> $DBGLOG
|
||||
config_load $CGCONFIG
|
||||
|
||||
config_get enab cgroups enabled "1"
|
||||
[ $enab -eq 0 ] && return 1
|
||||
|
||||
config_get defgrp cgroups defgroup "_undef_"
|
||||
[ "$defgrp" == "_undef_" ] && return 1
|
||||
|
||||
if ! grep -q " $CGBASEDIR cgroup " /proc/mounts; then
|
||||
mount -t cgroup -o nodev,noexec,nosuid cgroup $CGBASEDIR
|
||||
[ $? -eq 0 ] || return 1
|
||||
fi
|
||||
|
||||
config_foreach cgroupinit_create_group cgroup
|
||||
return 0
|
||||
}
|
||||
|
||||
start_service () {
|
||||
cgroupinit_configure_cgroups
|
||||
[ $? -eq 0 ] || return
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command /sbin/cgroupd $CGBASEDIR $CGCONFIG
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service () {
|
||||
local cgdir procs prc
|
||||
|
||||
for cgdir in $(find $CGBASEDIR -type d -mindepth 1 -depth); do
|
||||
procs=$(cat $cgdir/cgroup.procs)
|
||||
for prc in $procs; do
|
||||
echo $prc > $CGBASEDIR/cgroup.procs
|
||||
done
|
||||
rmdir $cgdir
|
||||
done
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger $CGCONFIG
|
||||
}
|
||||
|
||||
@@ -15,31 +15,10 @@ config CWMP_ACS_HDM
|
||||
bool "HDM"
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Select Data Model"
|
||||
default tr098
|
||||
|
||||
config DATAMODEL_TR098
|
||||
bool "TR-098"
|
||||
|
||||
config DATAMODEL_TR181
|
||||
bool "TR-181"
|
||||
endchoice
|
||||
|
||||
config CWMP_DEBUG
|
||||
bool "Compile with debug options"
|
||||
default y
|
||||
|
||||
choice
|
||||
prompt "enable xmpp feature"
|
||||
default disable
|
||||
|
||||
config XMPP_DISABLE
|
||||
bool "disable"
|
||||
|
||||
config XMPP_ENABLE
|
||||
bool "enable"
|
||||
endchoice
|
||||
config CWMP_DEVEL_DEBUG
|
||||
bool "Compile with development debug options"
|
||||
default n
|
||||
|
||||
17
icwmp/Makefile
Executable file → Normal file
17
icwmp/Makefile
Executable file → Normal file
@@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=3.0-2017-09-28
|
||||
PKG_VERSION:=3.0-2016-02-24
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=fd932429d3a656fccabcda934932d008dae6e526
|
||||
PKG_SOURCE_VERSION:=476392f44397a10769efdd96005378732b9e915a
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
@@ -34,7 +34,7 @@ define Package/icwmp/Default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=CWMP client
|
||||
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +libexpat +libstrophe +curl +libtrace
|
||||
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt
|
||||
endef
|
||||
|
||||
define Package/icwmp/description
|
||||
@@ -68,7 +68,7 @@ endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE -D_AADJ
|
||||
|
||||
|
||||
ifneq ($(CWMP_REVISION)_,_)
|
||||
ifneq ($(CWMP_REVISION),exported)
|
||||
ifneq ($(CWMP_REVISION),Unversioned directory)
|
||||
@@ -86,9 +86,6 @@ CONFIGURE_ARGS += \
|
||||
--with-libubox-include-path=$(STAGING_DIR)/usr/include \
|
||||
--with-libubus-include-path=$(STAGING_DIR)/usr/include
|
||||
|
||||
CONFIGURE_ARGS += $(if $(CONFIG_DATAMODEL_TR181),--enable-datamodel=tr181,--enable-datamodel=tr098)
|
||||
CONFIGURE_ARGS += $(if $(CONFIG_XMPP_ENABLE),--enable-xmpp=enable,--enable-xmpp=disable)
|
||||
|
||||
ifeq ($(BUILD_VARIANT),zstream)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-http=zstream \
|
||||
@@ -122,18 +119,16 @@ endif
|
||||
|
||||
define Package/icwmp-$(BUILD_VARIANT)/install
|
||||
$(INSTALL_DIR) $(1)/etc/icwmpd
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/icwmpd
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/icwmpd $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/firewall.cwmp $(1)/etc/firewall.cwmp
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmpd.init $(1)/etc/init.d/icwmpd
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmpd.init $(1)/etc/init.d/icwmpd
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/90-cwmpfirewall
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||
$(CP) ./files/icwmp.hotplug $(1)/etc/hotplug.d/iface/90-icwmp
|
||||
ifeq ($(CONFIG_CWMP_SCRIPTS_FULL),y)
|
||||
$(INSTALL_DIR) $(1)/usr/share/icwmp
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/defaults $(1)/usr/share/icwmp
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
grep -q "Designated" /etc/banner || exit 0
|
||||
|
||||
. /lib/functions/network.sh
|
||||
|
||||
[ "$ACTION" == "ifup" ] || exit 0
|
||||
|
||||
local islan="$(uci -q get network.$INTERFACE.is_lan)"
|
||||
[ "$islan" == "1" ] && exit 0
|
||||
|
||||
local proto="$(uci -q get network.$INTERFACE.proto)"
|
||||
[ "$proto" == "none" ] && exit 0
|
||||
|
||||
local ifname="$(uci -q get network.$INTERFACE.ifname)"
|
||||
[ "${ifname:0:1}" == "@" ] && exit 0
|
||||
|
||||
mkdir -p /tmp/ipv4
|
||||
|
||||
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
|
||||
|
||||
[ "$previpaddr" = "$curipaddr" -a "$prevgateway" = "$curgateway" -a "$prevsubnets" = "$cursubnets" ] && exit 0
|
||||
|
||||
[ -f /etc/config/cwmp ] && /etc/init.d/icwmpd reload &
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2016 Inteno
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=inbd
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=92f918d26c0ffc22d1704f5ea6cbb0bd7fdbdab9
|
||||
PKG_SOURCE_PROTO:=git
|
||||
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)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
# support parallel build
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
#re create configure scripts if not present.
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
# run install target when cross compiling. basically, make install DESTDIR=$(PKG_INSTALL_DIR)
|
||||
# this way we don't need to pick out the resulting files from the build dir.
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/inbd
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Inteno Netlink Bridge Daemon
|
||||
URL:=
|
||||
DEPENDS:=+libuci +libubus +libblobmsg-json +libnl-genl
|
||||
endef
|
||||
|
||||
define Package/inbd/description
|
||||
Application handling netlink messages from kernel and sending them out on ubus.
|
||||
endef
|
||||
|
||||
define Package/inbd/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/inbd $(1)/usr/bin/
|
||||
cp $(PKG_BUILD_DIR)/files/etc/init.d/inbd $(1)/etc/init.d/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,inbd))
|
||||
@@ -1,35 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2016 Inteno
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=inteno-netmodes
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/inteno-netmodes
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+fping
|
||||
TITLE:=Predefined Network Modes
|
||||
endef
|
||||
|
||||
define Package/inteno-netmodes/description
|
||||
Predefined Network Modes
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
$(CP) ./files/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/inteno-netmodes/install
|
||||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,inteno-netmodes))
|
||||
@@ -1,5 +0,0 @@
|
||||
config mode 'setup'
|
||||
option dir '/etc/netmodes'
|
||||
option detail ''
|
||||
option curmode 'routed'
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$INTERFACE" != "wan" ] && exit
|
||||
|
||||
. /lib/functions/network.sh
|
||||
|
||||
network_get_ipaddr ip $INTERFACE
|
||||
repeaterready="$(uci -q get netmode.setup.repeaterready)"
|
||||
|
||||
[ -z "$ip" ] && exit
|
||||
|
||||
toggle_firewall() {
|
||||
local section=$1
|
||||
local disable=$2
|
||||
config_get name "$1" name
|
||||
if [ "$name" == "wan" ]; then
|
||||
uci -q set firewall.settings.disabled=$disable
|
||||
if [ "$disable" == "1" ]; then
|
||||
uci -q set firewall.$section.input="ACCEPT"
|
||||
else
|
||||
uci -q set firewall.$section.input="REJECT"
|
||||
fi
|
||||
uci -q commit firewall
|
||||
fi
|
||||
}
|
||||
|
||||
set_disabled() {
|
||||
config_load firewall
|
||||
config_foreach toggle_firewall zone $1
|
||||
/etc/init.d/firewall reload
|
||||
}
|
||||
|
||||
is_inteno_macaddr()
|
||||
{
|
||||
macaddr=$1
|
||||
|
||||
echo $macaddr | grep -i -e "^00:22:07" \
|
||||
-e "^02:22:07" \
|
||||
-e "^44:D4:37" \
|
||||
-e "^00:0C:07" \
|
||||
-e "^02:0C:07" \
|
||||
-e "^06:0C:07" \
|
||||
-e "^00:0C:43" \
|
||||
-e "^02:0C:43" \
|
||||
-e "^06:0C:43" \
|
||||
&& return
|
||||
false
|
||||
}
|
||||
|
||||
switch_mode() {
|
||||
[ "$repeaterready" == "1" ] || return
|
||||
|
||||
# flush the ip on br-lan; br-lan will anyhow be deleted.
|
||||
# this is needed if the ip received on the wan is also from the same net
|
||||
ip addr flush dev br-lan
|
||||
|
||||
# flush iptables in case the MASTER
|
||||
# tries to configure us before
|
||||
# firewall is disabled the proper way
|
||||
iptables -F
|
||||
|
||||
ubus call leds set '{"state" : "allflash"}'
|
||||
|
||||
local ret=0
|
||||
# let netmode-conf up to 20 seconds before switching mode
|
||||
for tm in 2 4 6 8; do
|
||||
if [ -f /tmp/wificontrol.txt ]; then
|
||||
ret=1
|
||||
break
|
||||
fi
|
||||
sleep $tm
|
||||
done
|
||||
|
||||
# let netmode-conf take over
|
||||
[ $ret -eq 1 ] && return
|
||||
|
||||
# go head with switching mode
|
||||
touch -f /tmp/switching_mode
|
||||
echo "Switching to 'extender' mode" > /dev/console
|
||||
uci -q set netmode.setup.curmode='repeater'
|
||||
uci set netmode.setup.repeaterready=0
|
||||
uci commit netmode
|
||||
/etc/init.d/netmode reload
|
||||
echo "Restarting network services" > /dev/console
|
||||
ubus call network reload
|
||||
wifi reload nodat
|
||||
ubus call router.network reload
|
||||
ubus call leds set '{"state" : "normal"}'
|
||||
rm -f /tmp/switching_mode
|
||||
}
|
||||
|
||||
test_ip() {
|
||||
if [ -n "$(echo $ip | grep -E '^(192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.)')" ]; then
|
||||
# private IP
|
||||
switch_mode
|
||||
set_disabled 1
|
||||
else
|
||||
# public IP
|
||||
set_disabled 0
|
||||
[ "$1" -eq "1" ] && {
|
||||
uci set netmode.setup.repeaterready=0
|
||||
uci commit netmode
|
||||
local pid="$(ps | grep wificontro[l] | awk '/repeater/ {print $1}')"
|
||||
[ "$pid" != "" ] && kill -9 $pid
|
||||
pid="$(pidof netmode-client-detect)"
|
||||
[ "$pid" == "" ] && /sbin/netmode-client-detect &
|
||||
|
||||
# set default JUCI page to overview
|
||||
uci -q set juci.juci.homepage="overview"
|
||||
uci commit juci
|
||||
}
|
||||
fi
|
||||
}
|
||||
|
||||
case "$(uci -q get netmode.setup.curmode)" in
|
||||
repeater*) test_ip ;;
|
||||
*) [ "$repeaterready" == "1" ] && test_ip 1;;
|
||||
esac
|
||||
|
||||
@@ -1,251 +0,0 @@
|
||||
#!/bin/sh
|
||||
# this scripts shifts the lan network prefixes
|
||||
# if a wan interface has the same network prefix.
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/network.sh
|
||||
|
||||
local lockfile="/tmp/70-shiftrange.lock"
|
||||
local restricted_nets=""
|
||||
local all_nets=""
|
||||
|
||||
|
||||
#####
|
||||
##### initial functions
|
||||
#####
|
||||
|
||||
initial_check()
|
||||
{
|
||||
# run only on ifup
|
||||
[ "$ACTION" == "ifup" ] || exit 0
|
||||
|
||||
# run only for uplink (not is_lan) interfaces
|
||||
local islan="$(uci -q get network.$INTERFACE.is_lan)"
|
||||
[ "$islan" != "1" ] || exit 0
|
||||
|
||||
# run only if the uplink interface has a configured protocol
|
||||
local proto="$(uci -q get network.$INTERFACE.proto)"
|
||||
[ "$proto" != "none" ] || exit 0
|
||||
}
|
||||
|
||||
finish()
|
||||
{
|
||||
lock -u $lockfile
|
||||
rm -f $lockfile
|
||||
}
|
||||
|
||||
# just one instance of this script at a time
|
||||
just_one_instance()
|
||||
{
|
||||
local counter=0
|
||||
local limit=10
|
||||
|
||||
#wait for the lock to become free
|
||||
while [ -e $lockfile ] ; do
|
||||
sleep 1
|
||||
counter=$((counter + 1))
|
||||
[ "$counter" -gt "$limit" ] && exit 1
|
||||
done
|
||||
|
||||
lock $lockfile
|
||||
trap finish EXIT INT TERM
|
||||
}
|
||||
|
||||
|
||||
#####
|
||||
##### helper functions
|
||||
#####
|
||||
|
||||
#given a an ip and a mask in the form of "192.168.1.1/24"
|
||||
#return the network address like "192.168.1.0/24"
|
||||
get_network_address()
|
||||
{
|
||||
local ip="$1"
|
||||
[ -z "$ip" ] && return
|
||||
|
||||
local prefix=${ip##*/}
|
||||
|
||||
local ip1=${ip%%.*} ; ip=${ip#*.*}
|
||||
local ip2=${ip%%.*} ; ip=${ip#*.*}
|
||||
local ip3=${ip%%.*} ; ip=${ip#*.*}
|
||||
local ip4=${ip%%/*}
|
||||
|
||||
local ip=$((($ip1 << 24) + ($ip2 << 16) + ($ip3 << 8) + $ip4))
|
||||
local mask=$((0xFFFFFFFF >> (32 - $prefix) << (32 - $prefix)))
|
||||
local network=$(($ip & $mask))
|
||||
|
||||
local n1=$((($network & 0xFF000000) >> 24))
|
||||
local n2=$((($network & 0x00FF0000) >> 16))
|
||||
local n3=$((($network & 0x0000FF00) >> 8))
|
||||
local n4=$(( $network & 0x000000FF))
|
||||
|
||||
echo "$n1.$n2.$n3.$n4/$prefix"
|
||||
}
|
||||
|
||||
#given a network address (192.168.1.0/24)
|
||||
#find the next network address (192.168.2.0/24)
|
||||
next_network_address()
|
||||
{
|
||||
local ip=$1
|
||||
local prefix=${ip##*/}
|
||||
|
||||
local ip1=${ip%%.*} ; ip=${ip#*.*}
|
||||
local ip2=${ip%%.*} ; ip=${ip#*.*}
|
||||
local ip3=${ip%%.*} ; ip=${ip#*.*}
|
||||
local ip4=${ip%%/*}
|
||||
|
||||
local ip=$((($ip1 << 24) + ($ip2 << 16) + ($ip3 << 8) + $ip4))
|
||||
local one=$((1 << (32-$prefix)))
|
||||
local new=$(($ip + $one))
|
||||
|
||||
local n1=$((($new & 0xFF000000) >> 24))
|
||||
local n2=$((($new & 0x00FF0000) >> 16))
|
||||
local n3=$((($new & 0x0000FF00) >> 8))
|
||||
local n4=$(( $new & 0x000000FF))
|
||||
|
||||
echo "$n1.$n2.$n3.$n4/$prefix"
|
||||
}
|
||||
|
||||
# given a network address and a prefix (192.168.2.0/24)
|
||||
# return the first host ip available (192.168.2.1)
|
||||
first_host_in_network ()
|
||||
{
|
||||
local ip=$1
|
||||
local prefix=${ip##*/}
|
||||
|
||||
local ip1=${ip%%.*} ; ip=${ip#*.*}
|
||||
local ip2=${ip%%.*} ; ip=${ip#*.*}
|
||||
local ip3=${ip%%.*} ; ip=${ip#*.*}
|
||||
local ip4=${ip%%/*}
|
||||
|
||||
local ip=$((($ip1 << 24) + ($ip2 << 16) + ($ip3 << 8) + $ip4))
|
||||
local new=$(($ip + 1))
|
||||
|
||||
local n1=$((($new & 0xFF000000) >> 24))
|
||||
local n2=$((($new & 0x00FF0000) >> 16))
|
||||
local n3=$((($new & 0x0000FF00) >> 8))
|
||||
local n4=$(( $new & 0x000000FF))
|
||||
|
||||
echo "$n1.$n2.$n3.$n4"
|
||||
}
|
||||
|
||||
# given a network address,
|
||||
# find the next available network address.
|
||||
shift_range()
|
||||
{
|
||||
local net="$1"
|
||||
while true ; do
|
||||
if [ "$restricted_nets" == "${restricted_nets//$net/}" ] && [ "$all_nets" == "${all_nets//$net/}" ]; then
|
||||
# found a net that is not in restricted nets nor in all nets
|
||||
break
|
||||
fi
|
||||
net=$(next_network_address $net)
|
||||
done
|
||||
|
||||
echo "$net"
|
||||
}
|
||||
|
||||
|
||||
#####
|
||||
##### parse all interfaces section
|
||||
#####
|
||||
|
||||
# restricted_nets = all the IPs on wan interfaces
|
||||
# all_nets = all the IPs on any interface
|
||||
parse_interface()
|
||||
{
|
||||
local interface=$1
|
||||
local nets="" # "192.168.1.1/24"
|
||||
local networks="" # "192.168.1.0/24"
|
||||
|
||||
config_get is_lan $interface is_lan
|
||||
network_get_subnets nets $interface
|
||||
|
||||
for n in $nets ; do
|
||||
networks="$networks $(get_network_address $n)"
|
||||
done
|
||||
|
||||
[ "$is_lan" != "1" ] && restricted_nets="$restricted_nets $networks"
|
||||
all_nets="$all_nets $networks"
|
||||
}
|
||||
|
||||
# parse all the interfaces
|
||||
# get all the IPs on wan interfaces and store them in restrict_nets
|
||||
# get all the IPs on all interfaces and store them in all_nets
|
||||
parse_interfaces()
|
||||
{
|
||||
config_foreach parse_interface "interface"
|
||||
}
|
||||
|
||||
|
||||
#####
|
||||
##### parse all lan interfaces section
|
||||
#####
|
||||
|
||||
parse_lan()
|
||||
{
|
||||
local interface=$1
|
||||
local nets=""
|
||||
local ips=""
|
||||
local newips=""
|
||||
local ips_changed=0
|
||||
|
||||
[ "$interface" == "loopback" ] && return
|
||||
config_get is_lan $interface is_lan
|
||||
[ "$is_lan" == "1" ] || return
|
||||
|
||||
network_get_subnets ips $interface
|
||||
|
||||
for ip in $ips ; do
|
||||
net="$(get_network_address $ip)"
|
||||
|
||||
if [ "$restricted_nets" == "${restricted_nets//$net/}" ] ; then
|
||||
# net is not in restricted nets
|
||||
# append ip to newips
|
||||
[ -z "$newips" ] && newips="${ip%/*}" || newips="$newips ${ip%/*}"
|
||||
continue
|
||||
fi
|
||||
|
||||
#net is in restricted_nets
|
||||
local newnet=$(shift_range $net)
|
||||
local newip="$(first_host_in_network $newnet)"
|
||||
# append newip to newips
|
||||
[ -z "$newips" ] && newips="$newip" || newips="$newips $newip"
|
||||
|
||||
ips_changed=1
|
||||
logger "$0: Changing the ip on interface $interface from $ip to $newip/${newnet##*/}"
|
||||
echo "$0: Changing the ip on interface $interface from $ip to $newip/${newnet##*/}" >/dev/console
|
||||
done
|
||||
|
||||
#assign the new ips
|
||||
if [ "$ips_changed" == "1" ] ; then
|
||||
uci -q set network.$interface.ipaddr="$newips"
|
||||
fi
|
||||
}
|
||||
|
||||
# parse all the interface with is_lan=1
|
||||
parse_lans()
|
||||
{
|
||||
config_foreach parse_lan "interface"
|
||||
}
|
||||
|
||||
|
||||
#####
|
||||
##### main
|
||||
#####
|
||||
|
||||
main()
|
||||
{
|
||||
initial_check
|
||||
just_one_instance
|
||||
|
||||
config_load network
|
||||
parse_interfaces
|
||||
parse_lans
|
||||
|
||||
if [ -n "$(uci changes network)" ] ; then
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
fi
|
||||
}
|
||||
|
||||
main $@
|
||||
@@ -1,102 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
include /lib/network
|
||||
|
||||
ps | grep hotplug | grep button && exit
|
||||
|
||||
MTK=0
|
||||
[ "$(db -q get hw.board.hardware)" == "EX400" ] && MTK=1
|
||||
|
||||
WANDEV="$(uci get layer2_interface_ethernet.Wan.ifname)"
|
||||
[ $MTK -eq 1 ] && WANDEV="eth0.2"
|
||||
|
||||
[ "$INTERFACE" != "$WANDEV" ] && exit
|
||||
|
||||
defroute=$(ip route | grep default | awk '{print$3}')
|
||||
|
||||
case "$(uci get netmode.setup.curmode)" in
|
||||
repeater*)
|
||||
echo "Preparing to switch mode"
|
||||
;;
|
||||
*)
|
||||
ping -c 1 -w 5 $defroute >/dev/null 2>&1 || killall -USR1 udhcpc
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
get_wifi_wet_interface() {
|
||||
handle_interface() {
|
||||
config_get mode "$1" mode
|
||||
if [ "$mode" == "sta" -o "$mode" == "wet" ] ; then
|
||||
config_get ifname "$1" ifname
|
||||
echo "$ifname"
|
||||
fi
|
||||
}
|
||||
config_load wireless
|
||||
config_foreach handle_interface wifi-iface
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
link=$(cat /sys/class/net/${WANDEV:0:4}/operstate)
|
||||
[ $MTK -eq 1 ] && link=$(swconfig dev switch0 port 0 get link | awk '{print$2}' | cut -d':' -f2)
|
||||
|
||||
case "$ACTION" in
|
||||
add|register)
|
||||
[ "$link" == "down" ] && return
|
||||
ubus call leds set '{"state" : "allflash"}'
|
||||
echo "Autoswitch to Extender mode" > /dev/console
|
||||
sleep 2
|
||||
wetif="$(get_wifi_wet_interface)"
|
||||
# remove wifi client interface
|
||||
case "$(uci get netmode.setup.curmode)" in
|
||||
repeater*)
|
||||
uci -q set $(get_wifi_iface_cfgstr $wetif).disabled=1
|
||||
;;
|
||||
esac
|
||||
uci commit wireless
|
||||
#add wan ethernet port
|
||||
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
|
||||
[ -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
|
||||
ubus call leds set '{"state" : "normal"}'
|
||||
;;
|
||||
remove|unregister)
|
||||
[ "$link" == "up" ] && return
|
||||
ubus call leds set '{"state" : "allflash"}'
|
||||
echo "Autoswitch to Repeater mode" > /dev/console
|
||||
sleep 2
|
||||
wetif="$(get_wifi_wet_interface)"
|
||||
# add wifi client interface
|
||||
case "$(uci get netmode.setup.curmode)" in
|
||||
repeater*)
|
||||
uci -q set $(get_wifi_iface_cfgstr $wetif).disabled=0
|
||||
;;
|
||||
esac
|
||||
uci commit wireless
|
||||
#remove wan ethernet port
|
||||
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
|
||||
[ -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
|
||||
wifi reload nodat
|
||||
killall -USR1 udhcpc
|
||||
}
|
||||
ubus call router.network reload
|
||||
ubus call leds set '{"state" : "normal"}'
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,320 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=10
|
||||
USE_PROCD=1
|
||||
|
||||
TMPDIR=/var/netmodes
|
||||
OLD_MODE_FILE=/var/netmodes/old_mode
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/network/config.sh
|
||||
|
||||
local modedir=$(uci -q get netmode.setup.dir)
|
||||
[ -n "$modedir" ] || modedir="/etc/netmodes"
|
||||
|
||||
get_device() {
|
||||
local PORT_NAMES=$(db get hw.board.ethernetPortNames)
|
||||
local PORT_ORDER=$(db get hw.board.ethernetPortOrder)
|
||||
local cnt=1
|
||||
local idx=0
|
||||
|
||||
local pnum=$(echo $PORT_NAMES | wc -w)
|
||||
|
||||
if [ $pnum -le 2 ]; then
|
||||
PORT_NAMES=$(echo $PORT_NAMES | sed 's/LAN/LAN1/g')
|
||||
fi
|
||||
|
||||
# get index of interface name
|
||||
for i in $PORT_NAMES; do
|
||||
if [ "$i" == "$1" ]; then
|
||||
idx=$cnt
|
||||
fi
|
||||
cnt=$((cnt+1))
|
||||
done
|
||||
|
||||
# get port name from index
|
||||
cnt=1
|
||||
for i in $PORT_ORDER; do
|
||||
if [ "$cnt" == "$idx" ]; then
|
||||
echo $i
|
||||
fi
|
||||
cnt=$((cnt+1))
|
||||
done
|
||||
}
|
||||
|
||||
populate_netmodes() {
|
||||
[ -f /etc/config/netmode -a -d $modedir ] || return
|
||||
local curmode
|
||||
|
||||
config_load netmode
|
||||
|
||||
config_get curmode setup curmode
|
||||
|
||||
mkdir -p $TMPDIR
|
||||
|
||||
if [ "$curmode" == "routed" ]; then
|
||||
local hw="$(db -q get hw.board.hardware)"
|
||||
if [ "$hw" == "EX400" ]; then
|
||||
curmode="routed_mtk"
|
||||
else
|
||||
curmode="routed_brcm"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $curmode > $OLD_MODE_FILE
|
||||
|
||||
delete_netmode() {
|
||||
uci delete netmode.$1
|
||||
}
|
||||
|
||||
config_foreach delete_netmode netmode
|
||||
uci commit netmode
|
||||
|
||||
wan=$(get_device WAN)
|
||||
lan1=$(get_device LAN1)
|
||||
lan2=$(get_device LAN2)
|
||||
lan3=$(get_device LAN3)
|
||||
lan4=$(get_device LAN4)
|
||||
lan5=$(get_device LAN5)
|
||||
|
||||
for file in $(find $modedir -type f); do
|
||||
conf="$(echo $file | cut -d'/' -f5)"
|
||||
if [ "$conf" == "layer2_interface_ethernet" ]; then
|
||||
grep -q "\$WAN" $file && sed -i "s/\$WAN/$wan/g" $file
|
||||
fi
|
||||
if [ "$conf" == "network" ]; then
|
||||
grep -q "\$WAN" $file && sed -i "s/\$WAN/$wan/g" $file
|
||||
grep -q "\$LAN1" $file && sed -i "s/\$LAN1/$lan1/g" $file
|
||||
grep -q "\$LAN2" $file && sed -i "s/\$LAN2/$lan2/g" $file
|
||||
grep -q "\$LAN3" $file && sed -i "s/\$LAN3/$lan3/g" $file
|
||||
grep -q "\$LAN4" $file && sed -i "s/\$LAN4/$lan4/g" $file
|
||||
|
||||
ifname="$(uci -q get $file.wan.ifname | sed 's/[ \t]*$//')"
|
||||
uci -q set $file.wan.ifname="$ifname"
|
||||
uci -q commit $file
|
||||
fi
|
||||
done
|
||||
|
||||
local hardware=$(db get hw.board.hardware)
|
||||
local keys lang desc exp exclude
|
||||
for mode in $(ls $modedir); do
|
||||
|
||||
case "$mode" in
|
||||
repeater*)
|
||||
wlctl -i wl1 ap >/dev/null 2>&1 || ifconfig rai0 2>/dev/null | grep -q rai0 || continue
|
||||
;;
|
||||
esac
|
||||
|
||||
lang=""
|
||||
desc=""
|
||||
exp=""
|
||||
uci -q set netmode.$mode=netmode
|
||||
json_load "$(cat $modedir/$mode/DETAILS)"
|
||||
|
||||
if json_select excluded_boards; then
|
||||
exclude=0
|
||||
_i=1
|
||||
while json_get_var board $_i; do
|
||||
case "$hardware" in
|
||||
$board)
|
||||
uci -q delete netmode.$mode
|
||||
exclude=1
|
||||
break
|
||||
;;
|
||||
esac
|
||||
_i=$((_i+1))
|
||||
done
|
||||
json_select ..
|
||||
[ $exclude -eq 1 ] && continue
|
||||
fi
|
||||
|
||||
if json_select acl; then
|
||||
_i=1
|
||||
while json_get_var user $_i; do
|
||||
uci add_list netmode.$mode._access_r="$user"
|
||||
_i=$((_i+1))
|
||||
done
|
||||
json_select ..
|
||||
fi
|
||||
|
||||
json_select description
|
||||
json_get_keys keys
|
||||
for k in $keys; do
|
||||
json_get_keys lang $k
|
||||
lang=$(echo $lang | sed 's/^[ \t]*//;s/[ \t]*$//')
|
||||
json_select $k
|
||||
json_get_var desc $lang
|
||||
uci -q set netmode.$mode."desc_$lang"="$desc"
|
||||
[ "$lang" == "en" ] && uci -q set netmode.$mode."desc"="$desc"
|
||||
json_select ..
|
||||
done
|
||||
json_select ..
|
||||
|
||||
json_select explanation
|
||||
json_get_keys keys
|
||||
for k in $keys; do
|
||||
json_get_keys lang $k
|
||||
lang=$(echo $lang | sed 's/^[ \t]*//;s/[ \t]*$//')
|
||||
json_select $k
|
||||
json_get_var exp $lang
|
||||
uci -q set netmode.$mode."exp_$lang"="$exp"
|
||||
[ "$lang" == "en" ] && uci -q set netmode.$mode."exp"="$exp"
|
||||
json_select ..
|
||||
done
|
||||
json_select ..
|
||||
|
||||
json_get_var cred credentials
|
||||
uci -q set netmode.$mode.askcred="$cred"
|
||||
json_get_var ulb uplink_band
|
||||
uci -q set netmode.$mode.uplink_band="$ulb"
|
||||
json_get_var reboot reboot
|
||||
uci -q set netmode.$mode.reboot="$reboot"
|
||||
done
|
||||
|
||||
config_get curmode setup curmode
|
||||
[ -d /etc/netmodes/$curmode ] || {
|
||||
[ "$(db -q get hw.board.hardware)" == "EX400" ] && uci -q set netmode.setup.curmode="routed_mtk" || uci -q set netmode.setup.curmode="routed_brcm"
|
||||
}
|
||||
|
||||
uci commit netmode
|
||||
}
|
||||
|
||||
switch_netmode() {
|
||||
[ -f /etc/config/netmode -a -d $modedir ] || return
|
||||
local curmode conf repeaterready old_mode
|
||||
|
||||
config_load netmode
|
||||
|
||||
config_get curmode setup curmode
|
||||
|
||||
config_get repeaterready setup repeaterready "0"
|
||||
if [ "$repeaterready" == "1" ] ; then
|
||||
uci -q set netmode.setup.repeaterready="0"
|
||||
uci commit netmode
|
||||
fi
|
||||
|
||||
if [ "$curmode" == "repeater" ]; then
|
||||
local hw="$(db -q get hw.board.hardware)"
|
||||
if [ "$hw" == "EX400" ]; then
|
||||
curmode="repeater_mtk_5g_up_dual_down"
|
||||
else
|
||||
curmode="repeater_brcm_2g_up_dual_down"
|
||||
fi
|
||||
uci set netmode.setup.curmode="$curmode"
|
||||
uci commit netmode
|
||||
fi
|
||||
if [ "$curmode" == "routed" ]; then
|
||||
local hw="$(db -q get hw.board.hardware)"
|
||||
if [ "$hw" == "EX400" ]; then
|
||||
curmode="routed_mtk"
|
||||
else
|
||||
curmode="routed_brcm"
|
||||
fi
|
||||
uci set netmode.setup.curmode="$curmode"
|
||||
uci commit netmode
|
||||
fi
|
||||
|
||||
old_mode=`cat $OLD_MODE_FILE 2>/dev/null`
|
||||
|
||||
# if curmode has not changed do not copy configs
|
||||
if [ "$curmode" == "$old_mode" ]; then
|
||||
/etc/init.d/enviroment reload
|
||||
return
|
||||
fi
|
||||
|
||||
echo $curmode >$OLD_MODE_FILE
|
||||
|
||||
[ -d "/etc/netmodes/$curmode" ] || return
|
||||
cp /etc/netmodes/$curmode/* /etc/config/
|
||||
rm -f /etc/config/DETAILS
|
||||
sync
|
||||
local reboot=$(uci -q get netmode.$curmode.reboot)
|
||||
local askcred=$(uci -q get netmode.$curmode.askcred)
|
||||
if [ "$reboot" == "0" ]; then
|
||||
/etc/init.d/enviroment reload
|
||||
case "$curmode" in
|
||||
routed*)
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
;;
|
||||
repeater*)
|
||||
[ -f /etc/init.d/omcproxy ] && /etc/init.d/omcproxy stop
|
||||
;;
|
||||
esac
|
||||
else
|
||||
reboot &
|
||||
fi
|
||||
}
|
||||
|
||||
start_client_listener() {
|
||||
local curmode repeaterready ulcpid
|
||||
|
||||
config_load netmode
|
||||
config_get repeaterready setup repeaterready 0
|
||||
|
||||
ulcpid=$(ps | grep "ubus listen client" | grep -v grep | awk '{print$1}')
|
||||
|
||||
[ $repeaterready -eq 1 ] && {
|
||||
killall -SIGKILL netmode-client-detect >/dev/null 2>&1
|
||||
kill -9 $ulcpid >/dev/null 2>&1
|
||||
return
|
||||
}
|
||||
|
||||
config_get curmode setup curmode
|
||||
|
||||
case "$curmode" in
|
||||
repeater*)
|
||||
killall -SIGKILL netmode-client-detect >/dev/null 2>&1
|
||||
kill -9 $ulcpid >/dev/null 2>&1
|
||||
;;
|
||||
*)
|
||||
pidof netmode-client-detect || /sbin/netmode-client-detect &
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
start_netmode_discover() {
|
||||
local curmode repeaterready
|
||||
|
||||
killall -9 netmode-discover >/dev/null 2>&1
|
||||
|
||||
config_load netmode
|
||||
config_get repeaterready setup repeaterready 0
|
||||
|
||||
[ $repeaterready -eq 1 ] && return
|
||||
|
||||
config_get curmode setup curmode
|
||||
|
||||
case "$curmode" in
|
||||
repeater*)
|
||||
/sbin/netmode-discover &
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
start_service() {
|
||||
populate_netmodes
|
||||
start_client_listener
|
||||
start_netmode_discover
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
switch_netmode
|
||||
|
||||
# set default JUCI page to overview
|
||||
uci -q set juci.juci.homepage="overview"
|
||||
uci commit juci
|
||||
|
||||
start_client_listener
|
||||
start_netmode_discover
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
killall -SIGKILL netmode-client-detect >/dev/null 2>&1
|
||||
killall -9 netmode-discover >/dev/null 2>&1
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger netmode
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Bridged IPTV" },
|
||||
{ "sv" : "Brygg IPTV" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "LAN4 port is bridged with IPTV VLAN" },
|
||||
{ "sv" : "LAN4 port överbryggas med IPTV VLAN" }
|
||||
],
|
||||
"credentials" : 0,
|
||||
"excluded_boards" : [
|
||||
"CG300",
|
||||
"CG301",
|
||||
"EX400"
|
||||
],
|
||||
"acl" : [
|
||||
"admin",
|
||||
"support"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
config dnsmasq
|
||||
option domainneeded 1
|
||||
option boguspriv 1
|
||||
option filterwin2k 0
|
||||
option localise_queries 1
|
||||
option rebind_protection 0
|
||||
option rebind_localhost 1
|
||||
option local '/lan/'
|
||||
option domain 'lan'
|
||||
option expandhosts 1
|
||||
option nonegcache 0
|
||||
option authoritative 1
|
||||
option readethers 1
|
||||
option leasefile '/tmp/dhcp.leases'
|
||||
option resolvfile '/tmp/resolv.conf.auto'
|
||||
|
||||
config dhcp lan
|
||||
option interface lan
|
||||
option start 100
|
||||
option limit 150
|
||||
option leasetime 12h
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
config settings 'settings'
|
||||
option disabled '0'
|
||||
|
||||
config defaults
|
||||
option syn_flood 1
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
# Uncomment this line to disable ipv6 rules
|
||||
# option disable_ipv6 1
|
||||
|
||||
config zone
|
||||
option name lan
|
||||
list network 'lan'
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward ACCEPT
|
||||
|
||||
config zone
|
||||
option name wan
|
||||
list network 'wan'
|
||||
list network 'wan6'
|
||||
list network 'iptv'
|
||||
option input REJECT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
option masq 1
|
||||
option mtu_fix 1
|
||||
|
||||
config forwarding
|
||||
option src lan
|
||||
option dest wan
|
||||
|
||||
# We need to accept udp packets on port 68,
|
||||
# see https://dev.openwrt.org/ticket/4108
|
||||
config rule
|
||||
option name Allow-DHCP-Renew
|
||||
option src wan
|
||||
option proto udp
|
||||
option dest_port 68
|
||||
option target ACCEPT
|
||||
option family ipv4
|
||||
option hidden 1
|
||||
|
||||
# Allow IPv4 ping
|
||||
config rule
|
||||
option name Allow-Ping
|
||||
option src wan
|
||||
option proto icmp
|
||||
option icmp_type echo-request
|
||||
option family ipv4
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# Allow DHCPv6 replies
|
||||
# see https://dev.openwrt.org/ticket/10381
|
||||
config rule
|
||||
option name Allow-DHCPv6
|
||||
option src wan
|
||||
option proto udp
|
||||
option src_ip fe80::/10
|
||||
option src_port 547
|
||||
option dest_ip fe80::/10
|
||||
option dest_port 546
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# Allow essential incoming IPv6 ICMP traffic
|
||||
config rule
|
||||
option name Allow-ICMPv6-Input
|
||||
option src wan
|
||||
option proto icmp
|
||||
list icmp_type echo-request
|
||||
list icmp_type echo-reply
|
||||
list icmp_type destination-unreachable
|
||||
list icmp_type packet-too-big
|
||||
list icmp_type time-exceeded
|
||||
list icmp_type bad-header
|
||||
list icmp_type unknown-header-type
|
||||
list icmp_type router-solicitation
|
||||
list icmp_type neighbour-solicitation
|
||||
list icmp_type router-advertisement
|
||||
list icmp_type neighbour-advertisement
|
||||
option limit 1000/sec
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# Allow essential forwarded IPv6 ICMP traffic
|
||||
config rule
|
||||
option name Allow-ICMPv6-Forward
|
||||
option src wan
|
||||
option dest *
|
||||
option proto icmp
|
||||
list icmp_type echo-request
|
||||
list icmp_type echo-reply
|
||||
list icmp_type destination-unreachable
|
||||
list icmp_type packet-too-big
|
||||
list icmp_type time-exceeded
|
||||
list icmp_type bad-header
|
||||
list icmp_type unknown-header-type
|
||||
option limit 1000/sec
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# include a file with users custom iptables rules
|
||||
config include
|
||||
option path /etc/firewall.user
|
||||
option reload 1
|
||||
|
||||
# include a file with rules for SIP and RTP traffic
|
||||
config include
|
||||
option path /etc/firewall.sip
|
||||
option reload 1
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
config mcpd 'mcpd'
|
||||
option igmp_query_response_interval '10'
|
||||
option igmp_last_member_query_interval '10'
|
||||
option igmp_robustness_value '2'
|
||||
option igmp_lan_to_lan_multicast '0'
|
||||
option igmp_max_groups '25'
|
||||
option igmp_max_sources '10'
|
||||
option igmp_max_members '25'
|
||||
option igmp_fast_leave '1'
|
||||
option igmp_join_immediate '0'
|
||||
option igmp_proxy_enable '0'
|
||||
option igmp_snooping_enable '2'
|
||||
option igmp_snooping_interfaces 'br-iptv'
|
||||
option igmp_default_version '2'
|
||||
option igmp_query_interval '120'
|
||||
option igmp_proxy_interfaces 'iptv'
|
||||
|
||||
@@ -1,37 +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 '$LAN1 $LAN2 $LAN3'
|
||||
option ip6assign '60'
|
||||
|
||||
config interface 'wan'
|
||||
option type 'anywan'
|
||||
option proto 'dhcp'
|
||||
option vendorid '$HARDWAREID-INTENO'
|
||||
option hostname 'Inteno_$MAC4'
|
||||
option ifname 'ptm0.1 atm0.1 $WAN.1'
|
||||
option ipv6 '1'
|
||||
|
||||
config interface 'iptv'
|
||||
option type 'bridge'
|
||||
option proto 'dhcp'
|
||||
option gateway '0.0.0.0'
|
||||
option reqopts 'staticroutes'
|
||||
option ifname 'ptm0.100 atm1.1 $WAN.100 $LAN4'
|
||||
option defaultroute '0'
|
||||
|
||||
config interface 'wan6'
|
||||
option proto 'dhcpv6'
|
||||
option ifname '@wan'
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'a'
|
||||
option bandwidth '80'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option beamforming '1'
|
||||
option doth '1'
|
||||
option dfsc '1'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl0'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'b'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option doth '0'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl1'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'mixed-psk'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "VoIP + Bridged IPTV" },
|
||||
{ "sv" : "VoIP + Brygg IPTV" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "VoIP on dedicated VLAN + LAN4 port is bridged with IPTV VLAN" },
|
||||
{ "sv" : "VoIP on dedicated VLAN + LAN4 port överbryggas med IPTV VLAN" }
|
||||
],
|
||||
"credentials" : 0,
|
||||
"excluded_boards" : [
|
||||
"CG300",
|
||||
"CG301",
|
||||
"EX400",
|
||||
"F*"
|
||||
],
|
||||
"acl" : [
|
||||
"admin",
|
||||
"support"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
config dnsmasq
|
||||
option domainneeded 1
|
||||
option boguspriv 1
|
||||
option filterwin2k 0
|
||||
option localise_queries 1
|
||||
option rebind_protection 0
|
||||
option rebind_localhost 1
|
||||
option local '/lan/'
|
||||
option domain 'lan'
|
||||
option expandhosts 1
|
||||
option nonegcache 0
|
||||
option authoritative 1
|
||||
option readethers 1
|
||||
option leasefile '/tmp/dhcp.leases'
|
||||
option resolvfile '/tmp/resolv.conf.auto'
|
||||
|
||||
config dhcp lan
|
||||
option interface lan
|
||||
option start 100
|
||||
option limit 150
|
||||
option leasetime 12h
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
config settings 'settings'
|
||||
option disabled '0'
|
||||
|
||||
config defaults
|
||||
option syn_flood 1
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
# Uncomment this line to disable ipv6 rules
|
||||
# option disable_ipv6 1
|
||||
|
||||
config zone
|
||||
option name lan
|
||||
list network 'lan'
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward ACCEPT
|
||||
|
||||
config zone
|
||||
option name wan
|
||||
list network 'wan'
|
||||
list network 'wan6'
|
||||
list network 'iptv'
|
||||
option input REJECT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
option masq 1
|
||||
option mtu_fix 1
|
||||
|
||||
config forwarding
|
||||
option src lan
|
||||
option dest wan
|
||||
|
||||
# We need to accept udp packets on port 68,
|
||||
# see https://dev.openwrt.org/ticket/4108
|
||||
config rule
|
||||
option name Allow-DHCP-Renew
|
||||
option src wan
|
||||
option proto udp
|
||||
option dest_port 68
|
||||
option target ACCEPT
|
||||
option family ipv4
|
||||
option hidden 1
|
||||
|
||||
# Allow IPv4 ping
|
||||
config rule
|
||||
option name Allow-Ping
|
||||
option src wan
|
||||
option proto icmp
|
||||
option icmp_type echo-request
|
||||
option family ipv4
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# Allow DHCPv6 replies
|
||||
# see https://dev.openwrt.org/ticket/10381
|
||||
config rule
|
||||
option name Allow-DHCPv6
|
||||
option src wan
|
||||
option proto udp
|
||||
option src_ip fe80::/10
|
||||
option src_port 547
|
||||
option dest_ip fe80::/10
|
||||
option dest_port 546
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# Allow essential incoming IPv6 ICMP traffic
|
||||
config rule
|
||||
option name Allow-ICMPv6-Input
|
||||
option src wan
|
||||
option proto icmp
|
||||
list icmp_type echo-request
|
||||
list icmp_type echo-reply
|
||||
list icmp_type destination-unreachable
|
||||
list icmp_type packet-too-big
|
||||
list icmp_type time-exceeded
|
||||
list icmp_type bad-header
|
||||
list icmp_type unknown-header-type
|
||||
list icmp_type router-solicitation
|
||||
list icmp_type neighbour-solicitation
|
||||
list icmp_type router-advertisement
|
||||
list icmp_type neighbour-advertisement
|
||||
option limit 1000/sec
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# Allow essential forwarded IPv6 ICMP traffic
|
||||
config rule
|
||||
option name Allow-ICMPv6-Forward
|
||||
option src wan
|
||||
option dest *
|
||||
option proto icmp
|
||||
list icmp_type echo-request
|
||||
list icmp_type echo-reply
|
||||
list icmp_type destination-unreachable
|
||||
list icmp_type packet-too-big
|
||||
list icmp_type time-exceeded
|
||||
list icmp_type bad-header
|
||||
list icmp_type unknown-header-type
|
||||
option limit 1000/sec
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# include a file with users custom iptables rules
|
||||
config include
|
||||
option path /etc/firewall.user
|
||||
option reload 1
|
||||
|
||||
# include a file with rules for SIP and RTP traffic
|
||||
config include
|
||||
option path /etc/firewall.sip
|
||||
option reload 1
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
config mcpd 'mcpd'
|
||||
option igmp_query_response_interval '10'
|
||||
option igmp_last_member_query_interval '10'
|
||||
option igmp_robustness_value '2'
|
||||
option igmp_lan_to_lan_multicast '0'
|
||||
option igmp_max_groups '25'
|
||||
option igmp_max_sources '10'
|
||||
option igmp_max_members '25'
|
||||
option igmp_fast_leave '1'
|
||||
option igmp_join_immediate '0'
|
||||
option igmp_proxy_enable '0'
|
||||
option igmp_snooping_enable '2'
|
||||
option igmp_snooping_interfaces 'br-iptv'
|
||||
option igmp_default_version '2'
|
||||
option igmp_query_interval '120'
|
||||
option igmp_proxy_interfaces 'iptv'
|
||||
|
||||
@@ -1,45 +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 '$LAN1 $LAN2 $LAN3'
|
||||
option ip6assign '60'
|
||||
|
||||
config interface 'wan'
|
||||
option type 'anywan'
|
||||
option proto 'dhcp'
|
||||
option vendorid '$HARDWAREID-INTENO'
|
||||
option hostname 'Inteno_$MAC4'
|
||||
option ifname 'ptm0.1 atm0.1 $WAN.1'
|
||||
option ipv6 '1'
|
||||
|
||||
config interface 'iptv'
|
||||
option type 'bridge'
|
||||
option proto 'dhcp'
|
||||
option gateway '0.0.0.0'
|
||||
option reqopts 'staticroutes'
|
||||
option ifname 'ptm0.100 atm1.1 $WAN.100 $LAN4'
|
||||
option defaultroute '0'
|
||||
|
||||
config interface 'voip'
|
||||
option type 'anywan'
|
||||
option proto 'dhcp'
|
||||
option gateway '0.0.0.0'
|
||||
option reqopts 'staticroutes'
|
||||
option ifname 'ptm0.200 atm2.1 $WAN.200'
|
||||
option defaultroute '0'
|
||||
|
||||
config interface 'wan6'
|
||||
option proto 'dhcpv6'
|
||||
option ifname '@wan'
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'a'
|
||||
option bandwidth '80'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option beamforming '1'
|
||||
option doth '1'
|
||||
option dfsc '1'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl0'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'b'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option doth '0'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl1'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'mixed-psk'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Repeater 2.4▴▾5" },
|
||||
{ "sv" : "Repeater 2.4▴▾5" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "Your router is going to act as a wired extender or wireless repeater to the selected Wireless Access Point. Uplink 2.4G & Downlink 5G" },
|
||||
{ "sv" : "Routern kommer att fungera som en trådbunden extender eller trådlös repeater till den valda trådlösa åtkomstpunkten. Uplink 2.4G & Downlink 5G" }
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"DG15*",
|
||||
"DG40*",
|
||||
"EG40*",
|
||||
"EX40*",
|
||||
"F*"
|
||||
],
|
||||
"uplink_band" : "b",
|
||||
"credentials" : 1,
|
||||
"reboot" : 0
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
config ethernet_interface 'Wan'
|
||||
option baseifname '$WAN'
|
||||
option ifname '$WAN.1'
|
||||
option name 'WAN'
|
||||
option bridge '1'
|
||||
|
||||
@@ -1,15 +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 'wan'
|
||||
option type 'bridge'
|
||||
option proto 'dhcp'
|
||||
option hostname 'Inteno-$BSSID4'
|
||||
option ifname '$WAN.1 $LAN1 $LAN2 $LAN3 $LAN4'
|
||||
option reqopts '43'
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
config owsd 'global'
|
||||
option sock '/var/run/ubus.sock'
|
||||
option www '/www'
|
||||
option redirect '/cgi-bin/luci:/cacheflush.html'
|
||||
|
||||
config owsd-listen 'loopback'
|
||||
option port '80'
|
||||
option interface 'loopback'
|
||||
option ipv6 'on'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'lan'
|
||||
option port '80'
|
||||
option interface 'lan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
option whitelist_dhcp_domains '1'
|
||||
|
||||
config owsd-listen 'wan'
|
||||
option port '80'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'wan_8080'
|
||||
option port '8080'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'wan_8181'
|
||||
option port '8181'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'a'
|
||||
option bandwidth '80'
|
||||
option hwmode '11ac'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '0'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option beamforming '1'
|
||||
option doth '1'
|
||||
option dfsc '1'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl0'
|
||||
option network 'wan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
option autoconf '1'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'b'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '0'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
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'
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Repeater 2.4▴▾2.4&5" },
|
||||
{ "sv" : "Repeater 2.4▴▾2.4&5" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "Your router is going to act as a wired extender or wireless repeater to the selected Wireless Access Point. Uplink 2.4G & Downlink 2.4G + 5G" },
|
||||
{ "sv" : "Routern kommer att fungera som en trådbunden extender eller trådlös repeater till den valda trådlösa åtkomstpunkten. Uplink 2.4G & Downlink 2.4G + 5G" }
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"DG15*",
|
||||
"DG40*",
|
||||
"EG40*",
|
||||
"EX40*",
|
||||
"F*"
|
||||
],
|
||||
"uplink_band" : "b",
|
||||
"credentials" : 1,
|
||||
"reboot" : 0
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
config ethernet_interface 'Wan'
|
||||
option baseifname '$WAN'
|
||||
option ifname '$WAN.1'
|
||||
option name 'WAN'
|
||||
option bridge '1'
|
||||
|
||||
@@ -1,15 +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 'wan'
|
||||
option type 'bridge'
|
||||
option proto 'dhcp'
|
||||
option hostname 'Inteno-$BSSID4'
|
||||
option ifname '$WAN.1 $LAN1 $LAN2 $LAN3 $LAN4'
|
||||
option reqopts '43'
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
config owsd 'global'
|
||||
option sock '/var/run/ubus.sock'
|
||||
option www '/www'
|
||||
option redirect '/cgi-bin/luci:/cacheflush.html'
|
||||
|
||||
config owsd-listen 'loopback'
|
||||
option port '80'
|
||||
option interface 'loopback'
|
||||
option ipv6 'on'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'lan'
|
||||
option port '80'
|
||||
option interface 'lan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
option whitelist_dhcp_domains '1'
|
||||
|
||||
config owsd-listen 'wan'
|
||||
option port '80'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'wan_8080'
|
||||
option port '8080'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'wan_8181'
|
||||
option port '8181'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'a'
|
||||
option bandwidth '80'
|
||||
option hwmode '11ac'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '0'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option beamforming '1'
|
||||
option doth '1'
|
||||
option dfsc '1'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl0'
|
||||
option network 'wan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
option autoconf '1'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'b'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '0'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
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'
|
||||
option network 'wan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
option autoconf '1'
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Repeater 2.4▴▾2.4&5" },
|
||||
{ "sv" : "Repeater 2.4▴▾2.4&5" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "Your router is going to act as a wired extender or wireless repeater to the selected Wireless Access Point. Uplink 2.4G & Downlink 2.4G + 5G" },
|
||||
{ "sv" : "Routern kommer att fungera som en trådbunden extender eller trådlös repeater till den valda trådlösa åtkomstpunkten. Uplink 2.4G & Downlink 2.4G + 5G" }
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"*G*",
|
||||
"F*"
|
||||
],
|
||||
"uplink_band" : 'b',
|
||||
"credentials" : 1,
|
||||
"reboot" : 0
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
config interface 'loopback'
|
||||
option ifname 'lo'
|
||||
option proto 'static'
|
||||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config device 'lan_dev'
|
||||
option name 'eth0.1'
|
||||
option macaddr '$MACLAN'
|
||||
|
||||
config interface 'wan'
|
||||
option type 'bridge'
|
||||
option ifname 'eth0.2 eth0.1'
|
||||
option proto 'dhcp'
|
||||
option hostname 'Inteno-$BSSID4'
|
||||
option reqopts '66 67 128 224'
|
||||
option igmp_snooping '0'
|
||||
|
||||
config device 'wan_dev'
|
||||
option name 'eth0.2'
|
||||
option macaddr '$MACWAN'
|
||||
|
||||
config interface 'wan6'
|
||||
option ifname '@wan'
|
||||
option proto 'dhcpv6'
|
||||
|
||||
config switch
|
||||
option name 'switch0'
|
||||
option reset '1'
|
||||
option enable_vlan '1'
|
||||
|
||||
config switch_vlan
|
||||
option device 'switch0'
|
||||
option vlan '1'
|
||||
option ports '1 6t'
|
||||
|
||||
config switch_vlan
|
||||
option device 'switch0'
|
||||
option vlan '2'
|
||||
option ports '0 5t'
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
config owsd 'global'
|
||||
option sock '/var/run/ubus.sock'
|
||||
option www '/www'
|
||||
option redirect '/cgi-bin/luci:/cacheflush.html'
|
||||
|
||||
config owsd-listen 'loopback'
|
||||
option port '80'
|
||||
option interface 'loopback'
|
||||
option ipv6 'on'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'lan'
|
||||
option port '80'
|
||||
option interface 'lan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
option whitelist_dhcp_domains '1'
|
||||
|
||||
config owsd-listen 'wan'
|
||||
option port '80'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'wan_8080'
|
||||
option port '8080'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'wan_8181'
|
||||
option port '8181'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device ra0
|
||||
option band b
|
||||
option channel auto
|
||||
option bandwidth '20'
|
||||
option hwmode auto
|
||||
option htmode HT20
|
||||
option country 'DE'
|
||||
|
||||
config wifi-iface
|
||||
option device ra0
|
||||
option network wan
|
||||
option mode ap
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname ra0
|
||||
option wps_pbc 1
|
||||
|
||||
config wifi-device rai0
|
||||
option band a
|
||||
option channel auto
|
||||
option bandwidth '80'
|
||||
option hwmode 11ac
|
||||
option htmode VHT80
|
||||
option country 'DE'
|
||||
option beamforming 1
|
||||
|
||||
config wifi-iface
|
||||
option device rai0
|
||||
option network wan
|
||||
option mode ap
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname rai0
|
||||
option wps_pbc 1
|
||||
|
||||
config wifi-iface
|
||||
option device ra0
|
||||
option network wan
|
||||
option mode wet
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname apcli0
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Repeater 5▴▾2.4&5" },
|
||||
{ "sv" : "Repeater 5▴▾2.4&5" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "Your router is going to act as a wired extender or wireless repeater to the selected Wireless Access Point. Uplink 5G & Downlink 2.4G + 5G" },
|
||||
{ "sv" : "Routern kommer att fungera som en trådbunden extender eller trådlös repeater till den valda trådlösa åtkomstpunkten. Uplink 5G & Downlink 2.4G + 5G" }
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"*G*",
|
||||
"F*"
|
||||
],
|
||||
"uplink_band" : 'a',
|
||||
"credentials" : 1,
|
||||
"reboot" : 0
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
config interface 'loopback'
|
||||
option ifname 'lo'
|
||||
option proto 'static'
|
||||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config device 'lan_dev'
|
||||
option name 'eth0.1'
|
||||
option macaddr '$MACLAN'
|
||||
|
||||
config interface 'wan'
|
||||
option type 'bridge'
|
||||
option ifname 'eth0.2 eth0.1'
|
||||
option proto 'dhcp'
|
||||
option hostname 'Inteno-$BSSID4'
|
||||
option reqopts '66 67 128 224'
|
||||
option igmp_snooping '0'
|
||||
|
||||
config device 'wan_dev'
|
||||
option name 'eth0.2'
|
||||
option macaddr '$MACWAN'
|
||||
|
||||
config interface 'wan6'
|
||||
option ifname '@wan'
|
||||
option proto 'dhcpv6'
|
||||
|
||||
config switch
|
||||
option name 'switch0'
|
||||
option reset '1'
|
||||
option enable_vlan '1'
|
||||
|
||||
config switch_vlan
|
||||
option device 'switch0'
|
||||
option vlan '1'
|
||||
option ports '1 6t'
|
||||
|
||||
config switch_vlan
|
||||
option device 'switch0'
|
||||
option vlan '2'
|
||||
option ports '0 5t'
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
config owsd 'global'
|
||||
option sock '/var/run/ubus.sock'
|
||||
option www '/www'
|
||||
option redirect '/cgi-bin/luci:/cacheflush.html'
|
||||
|
||||
config owsd-listen 'loopback'
|
||||
option port '80'
|
||||
option interface 'loopback'
|
||||
option ipv6 'on'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'lan'
|
||||
option port '80'
|
||||
option interface 'lan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
option whitelist_dhcp_domains '1'
|
||||
|
||||
config owsd-listen 'wan'
|
||||
option port '80'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'wan_8080'
|
||||
option port '8080'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
config owsd-listen 'wan_8181'
|
||||
option port '8181'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
list origin '*'
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device ra0
|
||||
option band b
|
||||
option channel auto
|
||||
option bandwidth '20'
|
||||
option hwmode auto
|
||||
option htmode HT20
|
||||
option country 'DE'
|
||||
|
||||
config wifi-iface
|
||||
option device ra0
|
||||
option network wan
|
||||
option mode ap
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname ra0
|
||||
option wps_pbc 1
|
||||
|
||||
config wifi-device rai0
|
||||
option band a
|
||||
option channel auto
|
||||
option bandwidth '80'
|
||||
option hwmode 11ac
|
||||
option htmode VHT80
|
||||
option country 'DE'
|
||||
option beamforming 1
|
||||
|
||||
config wifi-iface
|
||||
option device rai0
|
||||
option network wan
|
||||
option mode ap
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname rai0
|
||||
option wps_pbc 1
|
||||
|
||||
config wifi-iface
|
||||
option device rai0
|
||||
option network wan
|
||||
option mode wet
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname apclii0
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Fully Routed (NAT)" },
|
||||
{ "sv" : "Fullt Omdirigerad (NAT)" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "" },
|
||||
{ "sv" : "" }
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"EX4*"
|
||||
],
|
||||
"credentials" : 0
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
config dnsmasq
|
||||
option domainneeded 1
|
||||
option boguspriv 1
|
||||
option filterwin2k 0
|
||||
option localise_queries 1
|
||||
option rebind_protection 0
|
||||
option rebind_localhost 1
|
||||
option local '/lan/'
|
||||
option domain 'lan'
|
||||
option expandhosts 1
|
||||
option nonegcache 0
|
||||
option authoritative 1
|
||||
option readethers 1
|
||||
option leasefile '/tmp/dhcp.leases'
|
||||
option resolvfile '/tmp/resolv.conf.auto'
|
||||
|
||||
config dhcp lan
|
||||
option interface lan
|
||||
option start 100
|
||||
option limit 150
|
||||
option leasetime 12h
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
config settings 'settings'
|
||||
option disabled '0'
|
||||
|
||||
config defaults
|
||||
option syn_flood 1
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
# Uncomment this line to disable ipv6 rules
|
||||
# option disable_ipv6 1
|
||||
|
||||
config zone
|
||||
option name lan
|
||||
list network 'lan'
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward ACCEPT
|
||||
|
||||
config zone
|
||||
option name wan
|
||||
list network 'wan'
|
||||
list network 'wan6'
|
||||
option input REJECT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
option masq 1
|
||||
option mtu_fix 1
|
||||
|
||||
config forwarding
|
||||
option src lan
|
||||
option dest wan
|
||||
|
||||
# We need to accept udp packets on port 68,
|
||||
# see https://dev.openwrt.org/ticket/4108
|
||||
config rule
|
||||
option name Allow-DHCP-Renew
|
||||
option src wan
|
||||
option proto udp
|
||||
option dest_port 68
|
||||
option target ACCEPT
|
||||
option family ipv4
|
||||
|
||||
# Allow IPv4 ping
|
||||
config rule
|
||||
option name Allow-Ping
|
||||
option src wan
|
||||
option proto icmp
|
||||
option icmp_type echo-request
|
||||
option family ipv4
|
||||
option target ACCEPT
|
||||
|
||||
config rule
|
||||
option name Allow-IGMP
|
||||
option src wan
|
||||
option proto igmp
|
||||
option family ipv4
|
||||
option target ACCEPT
|
||||
|
||||
# Allow DHCPv6 replies
|
||||
# see https://dev.openwrt.org/ticket/10381
|
||||
config rule
|
||||
option name Allow-DHCPv6
|
||||
option src wan
|
||||
option proto udp
|
||||
option src_ip fe80::/10
|
||||
option src_port 547
|
||||
option dest_ip fe80::/10
|
||||
option dest_port 546
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
|
||||
config rule
|
||||
option name Allow-MLD
|
||||
option src wan
|
||||
option proto icmp
|
||||
option src_ip fe80::/10
|
||||
list icmp_type '130/0'
|
||||
list icmp_type '131/0'
|
||||
list icmp_type '132/0'
|
||||
list icmp_type '143/0'
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
|
||||
# Allow essential incoming IPv6 ICMP traffic
|
||||
config rule
|
||||
option name Allow-ICMPv6-Input
|
||||
option src wan
|
||||
option proto icmp
|
||||
list icmp_type echo-request
|
||||
list icmp_type echo-reply
|
||||
list icmp_type destination-unreachable
|
||||
list icmp_type packet-too-big
|
||||
list icmp_type time-exceeded
|
||||
list icmp_type bad-header
|
||||
list icmp_type unknown-header-type
|
||||
list icmp_type router-solicitation
|
||||
list icmp_type neighbour-solicitation
|
||||
list icmp_type router-advertisement
|
||||
list icmp_type neighbour-advertisement
|
||||
option limit 1000/sec
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
|
||||
# Allow essential forwarded IPv6 ICMP traffic
|
||||
config rule
|
||||
option name Allow-ICMPv6-Forward
|
||||
option src wan
|
||||
option dest *
|
||||
option proto icmp
|
||||
list icmp_type echo-request
|
||||
list icmp_type echo-reply
|
||||
list icmp_type destination-unreachable
|
||||
list icmp_type packet-too-big
|
||||
list icmp_type time-exceeded
|
||||
list icmp_type bad-header
|
||||
list icmp_type unknown-header-type
|
||||
option limit 1000/sec
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
|
||||
# allow IPsec/ESP and ISAKMP passthrough
|
||||
config rule
|
||||
option src wan
|
||||
option dest lan
|
||||
option proto esp
|
||||
option target ACCEPT
|
||||
|
||||
config rule
|
||||
option src wan
|
||||
option dest lan
|
||||
option dest_port 500
|
||||
option proto udp
|
||||
option target ACCEPT
|
||||
|
||||
config dmz dmz
|
||||
option enabled '0'
|
||||
option exclude_ports '5060 7547'
|
||||
|
||||
# include a file with users custom iptables rules
|
||||
config include
|
||||
option path /etc/firewall.user
|
||||
option reload 1
|
||||
|
||||
# include a file with rules for prioritizing some specific packets
|
||||
config include
|
||||
option path /etc/firewall.qos
|
||||
option reload 1
|
||||
|
||||
# include a file with rules for DMZ Host
|
||||
config include dmzhost
|
||||
option path /etc/firewall.dmz
|
||||
option reload 1
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
config atm_bridge
|
||||
option link_type 'EoA'
|
||||
option encapseoa 'llcsnap_eth'
|
||||
option unit '0'
|
||||
option ifname 'atm0.1'
|
||||
option baseifname 'atm0'
|
||||
option atmtype 'ubr'
|
||||
option name 'atm_inet'
|
||||
option vpi '8'
|
||||
option vci '35'
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
config ethernet_interface 'Wan'
|
||||
option baseifname '$WAN'
|
||||
option ifname '$WAN.1'
|
||||
option name 'WAN'
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
config vdsl_interface
|
||||
option unit '0'
|
||||
option ifname 'ptm0.1'
|
||||
option baseifname 'ptm0'
|
||||
option name 'VDSL2'
|
||||
option dslat '1'
|
||||
option ptmprio '1'
|
||||
option ipqos '1'
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
config mcpd 'mcpd'
|
||||
option igmp_proxy_interfaces 'wan'
|
||||
option igmp_default_version '2'
|
||||
option igmp_query_interval '125'
|
||||
option igmp_query_response_interval '100'
|
||||
option igmp_last_member_query_interval '10'
|
||||
option igmp_robustness_value '2'
|
||||
option igmp_max_groups '25'
|
||||
option igmp_max_sources '10'
|
||||
option igmp_max_members '25'
|
||||
option igmp_fast_leave '1'
|
||||
option igmp_proxy_enable '1'
|
||||
option igmp_snooping_enable '2'
|
||||
option igmp_snooping_interfaces 'br-lan'
|
||||
@@ -1,29 +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 '$LAN1 $LAN2 $LAN3 $LAN4'
|
||||
option ip6assign '60'
|
||||
|
||||
config interface 'wan'
|
||||
option type 'anywan'
|
||||
option proto 'dhcp'
|
||||
option vendorid '$HARDWAREID-INTENO'
|
||||
option hostname 'Inteno_$MAC4'
|
||||
option ifname 'ptm0.1 atm0.1 $WAN.1'
|
||||
option ipv6 '1'
|
||||
|
||||
config interface 'wan6'
|
||||
option proto 'dhcpv6'
|
||||
option ifname '@wan'
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'a'
|
||||
option bandwidth '80'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option beamforming '1'
|
||||
option doth '1'
|
||||
option dfsc '1'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl0'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'b'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option doth '0'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl1'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'mixed-psk'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Fully Routed (NAT)" },
|
||||
{ "sv" : "Fullt Omdirigerad (NAT)" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "" },
|
||||
{ "sv" : "" }
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"*G*",
|
||||
"F*"
|
||||
],
|
||||
"reboot" : 0,
|
||||
"credentials" : 0
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
config dnsmasq
|
||||
option domainneeded 1
|
||||
option boguspriv 1
|
||||
option filterwin2k 0
|
||||
option localise_queries 1
|
||||
option rebind_protection 0
|
||||
option rebind_localhost 1
|
||||
option local '/lan/'
|
||||
option domain 'lan'
|
||||
option expandhosts 1
|
||||
option nonegcache 0
|
||||
option authoritative 1
|
||||
option readethers 1
|
||||
option leasefile '/tmp/dhcp.leases'
|
||||
option resolvfile '/tmp/resolv.conf.auto'
|
||||
|
||||
config dhcp lan
|
||||
option interface lan
|
||||
option start 100
|
||||
option limit 150
|
||||
option leasetime 12h
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
config settings 'settings'
|
||||
option disabled '0'
|
||||
|
||||
config defaults
|
||||
option syn_flood 1
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
# Uncomment this line to disable ipv6 rules
|
||||
# option disable_ipv6 1
|
||||
|
||||
config zone
|
||||
option name lan
|
||||
list network 'lan'
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward ACCEPT
|
||||
|
||||
config zone
|
||||
option name wan
|
||||
list network 'wan'
|
||||
list network 'wan6'
|
||||
option input REJECT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
option masq 1
|
||||
option mtu_fix 1
|
||||
|
||||
config forwarding
|
||||
option src lan
|
||||
option dest wan
|
||||
|
||||
# We need to accept udp packets on port 68,
|
||||
# see https://dev.openwrt.org/ticket/4108
|
||||
config rule
|
||||
option name Allow-DHCP-Renew
|
||||
option src wan
|
||||
option proto udp
|
||||
option dest_port 68
|
||||
option target ACCEPT
|
||||
option family ipv4
|
||||
|
||||
# Allow IPv4 ping
|
||||
config rule
|
||||
option name Allow-Ping
|
||||
option src wan
|
||||
option proto icmp
|
||||
option icmp_type echo-request
|
||||
option family ipv4
|
||||
option target ACCEPT
|
||||
|
||||
config rule
|
||||
option name Allow-IGMP
|
||||
option src wan
|
||||
option proto igmp
|
||||
option family ipv4
|
||||
option target ACCEPT
|
||||
|
||||
# Allow DHCPv6 replies
|
||||
# see https://dev.openwrt.org/ticket/10381
|
||||
config rule
|
||||
option name Allow-DHCPv6
|
||||
option src wan
|
||||
option proto udp
|
||||
option src_ip fe80::/10
|
||||
option src_port 547
|
||||
option dest_ip fe80::/10
|
||||
option dest_port 546
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
|
||||
config rule
|
||||
option name Allow-MLD
|
||||
option src wan
|
||||
option proto icmp
|
||||
option src_ip fe80::/10
|
||||
list icmp_type '130/0'
|
||||
list icmp_type '131/0'
|
||||
list icmp_type '132/0'
|
||||
list icmp_type '143/0'
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
|
||||
# Allow essential incoming IPv6 ICMP traffic
|
||||
config rule
|
||||
option name Allow-ICMPv6-Input
|
||||
option src wan
|
||||
option proto icmp
|
||||
list icmp_type echo-request
|
||||
list icmp_type echo-reply
|
||||
list icmp_type destination-unreachable
|
||||
list icmp_type packet-too-big
|
||||
list icmp_type time-exceeded
|
||||
list icmp_type bad-header
|
||||
list icmp_type unknown-header-type
|
||||
list icmp_type router-solicitation
|
||||
list icmp_type neighbour-solicitation
|
||||
list icmp_type router-advertisement
|
||||
list icmp_type neighbour-advertisement
|
||||
option limit 1000/sec
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
|
||||
# Allow essential forwarded IPv6 ICMP traffic
|
||||
config rule
|
||||
option name Allow-ICMPv6-Forward
|
||||
option src wan
|
||||
option dest *
|
||||
option proto icmp
|
||||
list icmp_type echo-request
|
||||
list icmp_type echo-reply
|
||||
list icmp_type destination-unreachable
|
||||
list icmp_type packet-too-big
|
||||
list icmp_type time-exceeded
|
||||
list icmp_type bad-header
|
||||
list icmp_type unknown-header-type
|
||||
option limit 1000/sec
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
|
||||
# allow IPsec/ESP and ISAKMP passthrough
|
||||
config rule
|
||||
option src wan
|
||||
option dest lan
|
||||
option proto esp
|
||||
option target ACCEPT
|
||||
|
||||
config rule
|
||||
option src wan
|
||||
option dest lan
|
||||
option dest_port 500
|
||||
option proto udp
|
||||
option target ACCEPT
|
||||
|
||||
config dmz dmz
|
||||
option enabled '0'
|
||||
option exclude_ports '5060 7547'
|
||||
|
||||
# include a file with users custom iptables rules
|
||||
config include
|
||||
option path /etc/firewall.user
|
||||
option reload 1
|
||||
|
||||
# include a file with rules for prioritizing some specific packets
|
||||
config include
|
||||
option path /etc/firewall.qos
|
||||
option reload 1
|
||||
|
||||
# include a file with rules for DMZ Host
|
||||
config include dmzhost
|
||||
option path /etc/firewall.dmz
|
||||
option reload 1
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
config interface 'loopback'
|
||||
option ifname 'lo'
|
||||
option proto 'static'
|
||||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config interface 'lan'
|
||||
option type 'bridge'
|
||||
option proto 'static'
|
||||
option is_lan '1'
|
||||
option ipaddr '192.168.1.1'
|
||||
option netmask '255.255.255.0'
|
||||
option ip6assign '60'
|
||||
option ifname 'eth0.1 ra0 rai0'
|
||||
|
||||
config device 'lan_dev'
|
||||
option name 'eth0.1'
|
||||
option macaddr '$MACLAN'
|
||||
|
||||
config interface 'wan'
|
||||
option ifname 'eth0.2'
|
||||
option proto 'dhcp'
|
||||
option reqopts '66 67 128 224'
|
||||
|
||||
config device 'wan_dev'
|
||||
option name 'eth0.2'
|
||||
option macaddr '$MACWAN'
|
||||
|
||||
config interface 'wan6'
|
||||
option ifname '@wan'
|
||||
option proto 'dhcpv6'
|
||||
|
||||
config switch
|
||||
option name 'switch0'
|
||||
option reset '1'
|
||||
option enable_vlan '1'
|
||||
|
||||
config switch_vlan
|
||||
option device 'switch0'
|
||||
option vlan '1'
|
||||
option ports '1 6t'
|
||||
|
||||
config switch_vlan
|
||||
option device 'switch0'
|
||||
option vlan '2'
|
||||
option ports '0 5t'
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device ra0
|
||||
option band b
|
||||
option channel auto
|
||||
option bandwidth '20'
|
||||
option hwmode auto
|
||||
option htmode HT20
|
||||
option country 'DE'
|
||||
|
||||
config wifi-iface
|
||||
option device ra0
|
||||
option network lan
|
||||
option mode ap
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option wps_pbc 1
|
||||
|
||||
config wifi-device rai0
|
||||
option band a
|
||||
option channel auto
|
||||
option bandwidth '80'
|
||||
option hwmode 11ac
|
||||
option htmode VHT80
|
||||
option country 'DE'
|
||||
option beamforming 1
|
||||
|
||||
config wifi-iface
|
||||
option device rai0
|
||||
option network lan
|
||||
option mode ap
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option wps_pbc 1
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# receive new client events
|
||||
# and trigger wificontrol in --router mode for that client
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
local action ipaddr macaddr network
|
||||
|
||||
timed_check() {
|
||||
while true; do
|
||||
network=${network:-lan}
|
||||
ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}'
|
||||
wificontrol --router
|
||||
sleep $1
|
||||
done
|
||||
}
|
||||
|
||||
is_inteno_macaddr()
|
||||
{
|
||||
macaddr=$1
|
||||
|
||||
echo $macaddr | grep -i -e "^00:22:07" \
|
||||
-e "^02:22:07" \
|
||||
-e "^44:D4:37" \
|
||||
-e "^00:0C:07" \
|
||||
-e "^02:0C:07" \
|
||||
-e "^06:0C:07" \
|
||||
-e "^00:0C:43" \
|
||||
-e "^02:0C:43" \
|
||||
-e "^06:0C:43" \
|
||||
&& return
|
||||
false
|
||||
}
|
||||
|
||||
timed_check 60 &
|
||||
|
||||
while true ; do
|
||||
ubus listen client | \
|
||||
while read event ; do
|
||||
#echo "netmode-client-detect got event: $event" >/dev/console
|
||||
json_load "$event"
|
||||
json_select client
|
||||
json_get_var action action
|
||||
[ "$action" == "connect" ] || continue
|
||||
json_get_var macaddr macaddr
|
||||
json_get_var ipaddr ipaddr
|
||||
json_get_var network network "lan"
|
||||
|
||||
if is_inteno_macaddr $macaddr; then
|
||||
echo "netmode-client-detect: a new Inteno device detected on '$network' network (MACAddr:$macaddr IPAddr:$ipaddr)" >/dev/console
|
||||
ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}'
|
||||
/sbin/wificontrol --router --destination $ipaddr
|
||||
fi
|
||||
done
|
||||
done
|
||||
@@ -1,288 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
state="exit"
|
||||
TMPPATH="/tmp/netmode_config_backup"
|
||||
CURMODE=""
|
||||
SLEEPTIME=300
|
||||
|
||||
set_wireless_values() {
|
||||
local iface_num="$1"
|
||||
local ssid="$2"
|
||||
local key="$3"
|
||||
local encryption="$4"
|
||||
local device="$5"
|
||||
local old_ssid old_key old_encryption
|
||||
if ! uci -q get wireless.@wifi-iface[$iface_num] >/dev/null 2>&1; then
|
||||
state="reload"
|
||||
uci add wireless wifi-iface >/dev/null 2>&1
|
||||
uci set wireless.@wifi-iface[$iface_num].device="$device"
|
||||
fi
|
||||
local network="$(uci -q get wireless.@wifi-iface[$iface_num].network)"
|
||||
old_ssid="$(uci -q get wireless.@wifi-iface[$iface_num].ssid)"
|
||||
old_key="$(uci -q get wireless.@wifi-iface[$iface_num].key)"
|
||||
old_encryption="$(uci -q get wireless.@wifi-iface[$iface_num].encryption)"
|
||||
if [ "$old_ssid" != "$ssid" -o "$old_encryption" != "$encryption" -o "$old_key" != "$key" -o -z "$network" ]; then
|
||||
#TODO: get network dynamicaly
|
||||
[ "$state" == "exit" ] && state="apply"
|
||||
[ -z "$network" ] && network="wan"
|
||||
uci set wireless.@wifi-iface[$iface_num].network="$network"
|
||||
uci set wireless.@wifi-iface[$iface_num].ssid="$ssid"
|
||||
uci set wireless.@wifi-iface[$iface_num].key="$key"
|
||||
uci set wireless.@wifi-iface[$iface_num].encryption="$encryption"
|
||||
fi
|
||||
}
|
||||
|
||||
get_wifi_device_from_band(){
|
||||
local section="$1"
|
||||
local band="$2"
|
||||
local __ret="$3"
|
||||
local b
|
||||
config_get b $section "band"
|
||||
if [ "$band" == "$b" ]; then
|
||||
eval "export -- \"$__ret=$section\""
|
||||
fi
|
||||
}
|
||||
|
||||
get_device(){
|
||||
local band="$1"
|
||||
config_foreach get_wifi_device_from_band "wifi-device" "$band" "$2"
|
||||
}
|
||||
|
||||
get_iface_num() {
|
||||
local device="$1"
|
||||
local prev="$2"
|
||||
local __save="$3"
|
||||
local i=0
|
||||
local dev
|
||||
while true; do
|
||||
[ $i -gt 100 ] && break ## just a safty messure
|
||||
if ! uci -q get wireless.@wifi-iface[$i] >/dev/null; then
|
||||
break
|
||||
fi
|
||||
mode="$(uci -q get wireless.@wifi-iface[$i].mode)"
|
||||
if [ "$mode" == "wet" -o "$mode" == "sta" ]; then
|
||||
i=$((i+1))
|
||||
continue
|
||||
fi
|
||||
dev="$(uci -q get wireless.@wifi-iface[$i].device)"
|
||||
if [ "$dev" != "$device" ]; then
|
||||
[ -z "$dev" ] && break
|
||||
i=$((i+1))
|
||||
elif [ $prev -ne 0 ]; then
|
||||
i=$((i+1))
|
||||
prev=$((prev-1))
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
eval "export -- \"$__save=$i\""
|
||||
}
|
||||
|
||||
restore() {
|
||||
if [ "$1" == "back" ]; then
|
||||
uci set juci.juci.homepage='netmode-wizard'
|
||||
uci commit juci
|
||||
cp $TMPPATH/* /etc/config/
|
||||
uci set netmode.setup.curmode=$CURMODE
|
||||
uci commit netmode
|
||||
ubus call network reload
|
||||
wifi reload
|
||||
ubus call router.network reload
|
||||
fi
|
||||
rm -r $TMPPATH
|
||||
ubus call leds set '{"state":"normal"}'
|
||||
}
|
||||
|
||||
backup() {
|
||||
mkdir -p $TMPPATH
|
||||
cp /etc/config/* $TMPPATH/
|
||||
CURMODE="$(uci -q get netmode.setup.curmode)"
|
||||
ubus call leds set '{"state":"allflash"}'
|
||||
}
|
||||
|
||||
###### START HERE #######
|
||||
|
||||
file="$1"
|
||||
from_gui="$2"
|
||||
|
||||
[ -f "$file" ] || exit
|
||||
|
||||
# let netmode-handler up to 20 seconds to finish switching mode
|
||||
for tm in 2 4 6 8; do
|
||||
if [ ! -f /tmp/switching_mode ]; then
|
||||
break
|
||||
fi
|
||||
sleep $tm
|
||||
done
|
||||
|
||||
[ "$from_gui" == "true" ] && backup
|
||||
|
||||
json_load "`cat $file`"
|
||||
json_select "wifi_ifaces"
|
||||
|
||||
local curmode repmode
|
||||
config_load netmode
|
||||
config_get curmode setup curmode
|
||||
|
||||
case $curmode in
|
||||
*repeater*)
|
||||
;;
|
||||
*)
|
||||
uci set netmode.setup.curmode="repeater"
|
||||
uci commit netmode
|
||||
/etc/init.d/netmode reload
|
||||
curmode="$(uci -q get netmode.setup.curmode)"
|
||||
;;
|
||||
esac
|
||||
|
||||
local apcliband="a"
|
||||
case $curmode in
|
||||
*_2g_*) apcliband="b";;
|
||||
esac
|
||||
|
||||
i=1
|
||||
|
||||
local dummy band ssid key encryption device iface_num
|
||||
|
||||
while json_get_var dummy $i; do
|
||||
json_select $i
|
||||
json_get_var band band
|
||||
[ "$band" == "" -o "$apcliband" == "$band" ] && break
|
||||
json_select ..
|
||||
i=$((i+1))
|
||||
done
|
||||
|
||||
[ "$apcliband" == "$band" -o "$band" == "" ] || {
|
||||
[ "$from_gui" == "true" ] && restore "back"
|
||||
exit
|
||||
}
|
||||
|
||||
repeater_iface_num=$(uci -q show wireless | grep -e ".mode='wet'" -e ".mode='sta'" | sed 's/.*\[\([0-9]\)\].*/\1/')
|
||||
|
||||
[ -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"
|
||||
|
||||
config_load wireless
|
||||
local b_num=0
|
||||
local a_num=0
|
||||
|
||||
i=1
|
||||
while json_get_var dummy $i; do
|
||||
json_select $i
|
||||
json_get_var band band
|
||||
json_get_var ssid ssid
|
||||
json_get_var encryption encryption
|
||||
json_get_var key key
|
||||
if [ "$band" == "" ]; then
|
||||
get_device "a" device
|
||||
get_iface_num "$device" "$a_num" iface_num
|
||||
a_num=$((a_num+1))
|
||||
[ -z $iface_num ] && {
|
||||
[ "$from_gui" == "true" ] && restore "back"
|
||||
exit
|
||||
}
|
||||
set_wireless_values "$iface_num" "$ssid" "$key" "$encryption" "$device"
|
||||
get_device "b" device
|
||||
get_iface_num "$device" "$b_num" iface_num
|
||||
b_num=$((b_num+1))
|
||||
[ -z $iface_num ] && {
|
||||
[ "$from_gui" == "true" ] && restore "back"
|
||||
exit
|
||||
}
|
||||
set_wireless_values "$iface_num" "$ssid" "$key" "$encryption" "$device"
|
||||
else
|
||||
get_device "$band" device
|
||||
case $band in
|
||||
a)
|
||||
get_iface_num "$device" "$a_num" iface_num
|
||||
a_num=$((a_num+1))
|
||||
;;
|
||||
b)
|
||||
get_iface_num "$device" "$b_num" iface_num
|
||||
b_num=$((b_num+1))
|
||||
;;
|
||||
esac
|
||||
[ -z $iface_num ] && {
|
||||
[ "$from_gui" == "true" ] && restore "back"
|
||||
exit
|
||||
}
|
||||
set_wireless_values "$iface_num" "$ssid" "$key" "$encryption" "$device"
|
||||
fi
|
||||
i=$((i+1))
|
||||
json_select ..
|
||||
done
|
||||
|
||||
i=$((b_num + a_num + 1))
|
||||
|
||||
if [ $repeater_iface_num -gt $i ]; then
|
||||
i=$((i-1))
|
||||
fi
|
||||
|
||||
while uci -q get wireless.@wifi-iface[$i] >/dev/null; do
|
||||
# if repeater_iface_num is greater than the number of
|
||||
# configured downlink we need to make sure its not deleted
|
||||
local mode="$(uci -q get wireless.@wifi-iface[$i].mode)"
|
||||
if [ "$mode" == "wet" -o "$mode" == "sta" ]; then
|
||||
i=$((i+1))
|
||||
continue
|
||||
fi
|
||||
state="reload"
|
||||
uci -q delete wireless.@wifi-iface[$i] >/dev/null
|
||||
# do not increment i. The next interface will now
|
||||
# have the same index as the deleted interface
|
||||
done
|
||||
|
||||
uci commit wireless
|
||||
|
||||
if [ "$from_gui" == "true" ]; then
|
||||
# check for connectivity
|
||||
wifi reload
|
||||
[ -f /etc/init.d/layer2_interface_ethernet -a -f /etc/config/layer2_interface_ethernet ] && /etc/init.d/layer2_interface_ethernet reload
|
||||
i=$SLEEPTIME;
|
||||
|
||||
while [ $i -gt 0 ]; do
|
||||
ip=`route -n | awk '/^0.0.0.0/{print $2}'`
|
||||
if [ "$ip" == "" ]; then
|
||||
i=$((i-10))
|
||||
sleep 10
|
||||
continue
|
||||
fi
|
||||
ping -w1 $ip
|
||||
if [ $? -eq 0 ]; then
|
||||
restore
|
||||
exit
|
||||
else
|
||||
i=$((i-10))
|
||||
sleep 9
|
||||
fi
|
||||
done
|
||||
restore "back"
|
||||
else
|
||||
if [ "$state" == "exit" ]; then
|
||||
return
|
||||
fi
|
||||
ubus call leds set '{"state":"allflash"}'
|
||||
if [ "$state" == "apply" ]; then
|
||||
# wifi apply
|
||||
wifi reload
|
||||
else
|
||||
# wifi reload
|
||||
wifi reload
|
||||
fi
|
||||
[ -f /etc/init.d/layer2_interface_ethernet -a -f /etc/config/layer2_interface_ethernet ] && /etc/init.d/layer2_interface_ethernet reload
|
||||
ubus call leds set '{"state":"normal"}'
|
||||
fi
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
local unlisted mac ipaddr netmask mask
|
||||
|
||||
mask_to_cidr() {
|
||||
nbits=0
|
||||
IFS=.
|
||||
for dec in $1 ; do
|
||||
case $dec in
|
||||
255) let nbits+=8;;
|
||||
254) let nbits+=7;;
|
||||
252) let nbits+=6;;
|
||||
248) let nbits+=5;;
|
||||
240) let nbits+=4;;
|
||||
224) let nbits+=3;;
|
||||
192) let nbits+=2;;
|
||||
128) let nbits+=1;;
|
||||
0);;
|
||||
*) echo "Error: $dec is not recognised"; exit 1
|
||||
esac
|
||||
done
|
||||
echo "$nbits"
|
||||
}
|
||||
|
||||
while true; do
|
||||
unlisted=0
|
||||
|
||||
ps | grep -q wifi | grep -q reload || {
|
||||
for mac in $(brctl showmacs br-wan 2>/dev/null | tail -n +2 | grep no | awk '{print$2}'); do
|
||||
grep -q "$mac" /proc/net/arp || unlisted=$((unlisted+1))
|
||||
done
|
||||
|
||||
ipaddr=$(ifconfig br-wan | grep -v inet6 | grep inet | tr ':' ' ' | awk '{print$3}')
|
||||
netmask=$(ifconfig br-wan | grep -v inet6 | grep inet | tr ':' ' ' | awk '{print$7}')
|
||||
mask=$(mask_to_cidr $netmask)
|
||||
}
|
||||
|
||||
if [ $unlisted -gt 0 -a -n "$ipaddr" -a -n "$netmask" ]; then
|
||||
fping -c 1 -t 1000 -g $ipaddr/$mask -q >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
sleep 20
|
||||
done
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
MTK=0
|
||||
[ "$(db -q get hw.board.hardware)" == "EX400" ] && MTK=1
|
||||
|
||||
if [ $MTK -eq 1 ]; then
|
||||
WANDEV="eth0.2"
|
||||
link=$(swconfig dev switch0 port 0 get link | awk '{print$2}' | cut -d':' -f2)
|
||||
else
|
||||
WANDEV="$(uci get layer2_interface_ethernet.Wan.ifname)"
|
||||
link=$(cat /sys/class/net/${WANDEV:0:4}/operstate)
|
||||
fi
|
||||
|
||||
[ "$link" == "up" ] && action=add
|
||||
[ "$link" == "down" ] && action=remove
|
||||
[ -z "$action" ] && exit
|
||||
|
||||
# trigger a fake hotplug net event
|
||||
INTERFACE=$WANDEV ACTION=$action /sbin/hotplug-call net
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user