mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-25 11:33:53 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2599967241 |
@@ -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:=62c3764e6765fa9b1d22cb5dda26476e4742bdcf
|
||||
PKG_SOURCE_VERSION:=015d279241d0ac5d8c1321aa6f78b9ae551575d1
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/asterisk-1.8.x
|
||||
|
||||
@@ -119,7 +119,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 +188,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 +341,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"
|
||||
@@ -455,8 +474,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 +571,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/
|
||||
@@ -705,6 +733,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,18 +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"
|
||||
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,7 +42,6 @@ start_service() {
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
asterisk -rx "config reload $CONFDIR/sip.conf"
|
||||
asterisk -rx "core reload"
|
||||
asterisk -rx "dialplan reload"
|
||||
asterisk -rx "brcm reload"
|
||||
|
||||
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))
|
||||
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\"}"
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.1.0
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr2
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=17aa3b1d8d372ebcf4d37379f7cc4fb59c461d4b
|
||||
PKG_SOURCE_VERSION:=ee63f0c087840adba9d944ae31d71a3ef9d64043
|
||||
PKG_NAME:=dectmngr2
|
||||
|
||||
|
||||
|
||||
@@ -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))
|
||||
@@ -10,7 +10,7 @@ PKG_GIGASET_ELEMENTS_VERSION ?= v$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE_URL:=$(PKG_GIGASET_ELEMENTS_SRC_URL)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=aa906b37062b6d7937a9c0f8e7b62b32afe4bdeb
|
||||
PKG_SOURCE_VERSION:=$(PKG_GIGASET_ELEMENTS_VERSION)
|
||||
|
||||
|
||||
PKG_MAINTAINER:=Magier Marcin, Figlarek Piotr
|
||||
@@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/gigaset-elements
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libjson-c +libcurl +libpthread
|
||||
DEPENDS:=+libjson-c +libcurl
|
||||
TITLE:=Gigaset elements
|
||||
endef
|
||||
|
||||
|
||||
@@ -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:=4.2.0
|
||||
PKG_RELEASE:=RC7
|
||||
BASE_PKG_VERSION:=3.4.1
|
||||
PKG_RELEASE:=RC11
|
||||
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
|
||||
export PKG_VERSION
|
||||
|
||||
###########################--RELEASE--################################
|
||||
|
||||
PKG_SOURCE_VERSION:=ee66d278b90b931013f2bc1c7a69f24ef5c742ea
|
||||
PKG_SOURCE_URL:=ssh://git@private.inteno.se/ice-client.git
|
||||
PKG_SOURCE_VERSION:=184d29446fe6103f567c968bf35569625326a82c
|
||||
ifeq ($(CONFIG_ICE_OPEN),y)
|
||||
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
|
||||
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
|
||||
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_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_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)
|
||||
endif
|
||||
|
||||
|
||||
###########################--RELEASE--################################
|
||||
|
||||
include $(INCLUDE_DIR)/uclibc++.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ice-client/Default
|
||||
@@ -58,7 +53,7 @@ define Package/ice-client
|
||||
$(call Package/ice-client/Default)
|
||||
TITLE:=ice-client
|
||||
MENU:=1
|
||||
DEPENDS:=+libopenssl +uclibcxx +libubus +ubus +ubusd +jshn +libubox +libpthread
|
||||
DEPENDS:=+libopenssl +libstdcpp +libubus +ubus +ubusd +jshn +libubox +libpthread
|
||||
endef
|
||||
|
||||
define Package/ice-client/config
|
||||
@@ -78,7 +73,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 +82,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--################################
|
||||
@@ -144,7 +140,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,texecService.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
|
||||
@@ -160,8 +156,6 @@ define Package/ice-client/install
|
||||
$(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
|
||||
|
||||
@@ -911,7 +905,7 @@ 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
|
||||
echo "system moduleRemove topic=texec" > /tmp/cfin
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
@@ -942,54 +936,6 @@ 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)
|
||||
@@ -1040,5 +986,4 @@ $(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,63 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
grep -rq "^ice:" /etc/passwd || {
|
||||
local password="$(db get hw.board.wpaKey)"
|
||||
if [ -n "$password" ]; then
|
||||
adduser -D -H -s /bin/false ice
|
||||
(echo $password; sleep 1; echo $password) | passwd ice >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
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-broadcom-wl'
|
||||
list write 'juci-broadcom-wl-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-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
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=3.0-2017-01-20
|
||||
PKG_VERSION:=3.0-2016-07-07
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=5c39d8d99127010c8d553495cd318ced80531a04
|
||||
PKG_SOURCE_VERSION:=6fac1df3418d727388162d5e006c7a756c9ff8d2
|
||||
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 +zlib +libjson-c +libexpat +curl
|
||||
endef
|
||||
|
||||
define Package/icwmp/description
|
||||
|
||||
@@ -1,34 +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
|
||||
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,70 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
include /lib/network
|
||||
|
||||
[ "$INTERFACE" != "$(uci get layer2_interface_ethernet.Wan.ifname)" ] && exit
|
||||
|
||||
case "$(uci get netmode.setup.curmode)" in
|
||||
repeater|repeater_dualdown) echo "Preparing to switch mode" ;;
|
||||
*) exit ;;
|
||||
esac
|
||||
|
||||
get_wifi_wet_interface() {
|
||||
# handle_interface() {
|
||||
# config_get mode "$1" mode
|
||||
# if [ "$mode" == "wet" ] ; then
|
||||
# config_get ifname "$1" ifname
|
||||
# echo "$ifname"
|
||||
# fi
|
||||
# }
|
||||
# config_load wireless
|
||||
# config_foreach handle_interface wifi-iface "$device"
|
||||
echo "wl1"
|
||||
}
|
||||
|
||||
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 $2
|
||||
}
|
||||
|
||||
case "$ACTION" in
|
||||
add|register)
|
||||
echo "Autoswitch to Extender mode" > /dev/console
|
||||
sleep 2
|
||||
# remove wifi client interface
|
||||
case "$(uci get netmode.setup.curmode)" in
|
||||
repeater_dualdown)
|
||||
uci -q set $(get_wifi_iface_cfgstr $(get_wifi_wet_interface)).disabled=1
|
||||
;;
|
||||
repeater)
|
||||
uci -q set $(get_wifi_iface_cfgstr $(get_wifi_wet_interface)).mode=ap
|
||||
;;
|
||||
esac
|
||||
uci commit wireless
|
||||
#add wan ethernet port
|
||||
uci set network.wan.ifname="$(echo $(uci get layer2_interface_ethernet.Wan.ifname) $(uci get network.wan.ifname) | tr ' ' '\n' | sort -u | tr '\n' ' ')"
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
;;
|
||||
remove|unregister)
|
||||
echo "Autoswitch to Repeater mode" > /dev/console
|
||||
sleep 2
|
||||
# add wifi client interface
|
||||
case "$(uci get netmode.setup.curmode)" in
|
||||
repeater_dualdown)
|
||||
uci -q set $(get_wifi_iface_cfgstr $(get_wifi_wet_interface)).disabled=0
|
||||
;;
|
||||
repeater)
|
||||
uci -q set $(get_wifi_iface_cfgstr $(get_wifi_wet_interface)).mode=wet
|
||||
;;
|
||||
esac
|
||||
uci commit wireless
|
||||
#remove wan ethernet port
|
||||
uci set network.wan.ifname="$(uci get network.wan.ifname | sed 's/$/ /' | sed -r "s/`uci get layer2_interface_ethernet.Wan.ifname` //g")"
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
;;
|
||||
esac
|
||||
@@ -1,176 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=10
|
||||
USE_PROCD=1
|
||||
|
||||
. /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
|
||||
|
||||
delete_netmode() {
|
||||
uci delete netmode.$1
|
||||
}
|
||||
|
||||
config_load netmode
|
||||
|
||||
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
|
||||
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
|
||||
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 || continue
|
||||
;;
|
||||
esac
|
||||
|
||||
lang=""
|
||||
desc=""
|
||||
exp=""
|
||||
uci -q set netmode.$mode=netmode
|
||||
uci -q set netmode.$mode.conf=$mode
|
||||
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 reboot reboot
|
||||
uci -q set netmode.$mode.reboot="$reboot"
|
||||
done
|
||||
uci commit netmode
|
||||
}
|
||||
|
||||
switch_netmode() {
|
||||
[ -f /etc/config/netmode -a -d $modedir ] || return
|
||||
|
||||
config_load netmode
|
||||
|
||||
config_get curmode setup curmode
|
||||
config_get conf $curmode conf
|
||||
cp /etc/netmodes/$conf/* /etc/config/
|
||||
rm -f /etc/config/DETAILS
|
||||
sync
|
||||
local reboot=$(uci -q get netmode.$curmode.reboot)
|
||||
if [ "$reboot" == "0" ]; then
|
||||
/etc/init.d/enviroment reload
|
||||
else
|
||||
reboot &
|
||||
fi
|
||||
}
|
||||
|
||||
start_service() {
|
||||
populate_netmodes
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
switch_netmode
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger netmode
|
||||
}
|
||||
|
||||
@@ -1,20 +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"
|
||||
],
|
||||
"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,23 +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'
|
||||
|
||||
config atm_bridge
|
||||
option link_type 'EoA'
|
||||
option encapseoa 'llcsnap_eth'
|
||||
option unit '1'
|
||||
option ifname 'atm1.1'
|
||||
option baseifname 'atm1'
|
||||
option atmtype 'ubr'
|
||||
option name 'atm_tv'
|
||||
option vpi '8'
|
||||
option vci '45'
|
||||
|
||||
@@ -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,18 +0,0 @@
|
||||
|
||||
|
||||
config 'vlan_interface'
|
||||
option name 'eth_tv'
|
||||
option ifname '$WAN.100'
|
||||
option baseifname '$WAN'
|
||||
option vlan8021q '100'
|
||||
option vlan8021p '0'
|
||||
option bridge '1'
|
||||
|
||||
config 'vlan_interface'
|
||||
option name 'vdsl_tv'
|
||||
option ifname 'ptm0.100'
|
||||
option baseifname 'ptm0'
|
||||
option vlan8021q '100'
|
||||
option vlan8021p '0'
|
||||
option bridge '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,86 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '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" : "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"
|
||||
],
|
||||
"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,34 +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'
|
||||
|
||||
config atm_bridge
|
||||
option link_type 'EoA'
|
||||
option encapseoa 'llcsnap_eth'
|
||||
option unit '1'
|
||||
option ifname 'atm1.1'
|
||||
option baseifname 'atm1'
|
||||
option atmtype 'ubr'
|
||||
option name 'atm_tv'
|
||||
option vpi '8'
|
||||
option vci '45'
|
||||
|
||||
config atm_bridge
|
||||
option link_type 'EoA'
|
||||
option encapseoa 'llcsnap_eth'
|
||||
option unit '1'
|
||||
option ifname 'atm2.1'
|
||||
option baseifname 'atm2'
|
||||
option atmtype 'ubr'
|
||||
option name 'atm_voip'
|
||||
option vpi '8'
|
||||
option vci '55'
|
||||
|
||||
@@ -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,32 +0,0 @@
|
||||
|
||||
|
||||
config 'vlan_interface'
|
||||
option name 'eth_tv'
|
||||
option ifname '$WAN.100'
|
||||
option baseifname '$WAN'
|
||||
option vlan8021q '100'
|
||||
option vlan8021p '0'
|
||||
option bridge '1'
|
||||
|
||||
config 'vlan_interface'
|
||||
option name 'eth_voip'
|
||||
option ifname '$WAN.200'
|
||||
option baseifname '$WAN'
|
||||
option vlan8021q '200'
|
||||
option vlan8021p '0'
|
||||
|
||||
config 'vlan_interface'
|
||||
option name 'vdsl_tv'
|
||||
option ifname 'ptm0.100'
|
||||
option baseifname 'ptm0'
|
||||
option vlan8021q '100'
|
||||
option vlan8021p '0'
|
||||
option bridge '1'
|
||||
|
||||
config 'vlan_interface'
|
||||
option name 'vdsl_voip'
|
||||
option ifname 'ptm0.200'
|
||||
option baseifname 'ptm0'
|
||||
option vlan8021q '200'
|
||||
option vlan8021p '0'
|
||||
|
||||
@@ -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,86 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '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*"
|
||||
],
|
||||
"acl" : [
|
||||
"admin"
|
||||
],
|
||||
"credentials" : 1,
|
||||
"reboot" : 0
|
||||
}
|
||||
@@ -1,123 +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
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward ACCEPT
|
||||
|
||||
config zone
|
||||
option name wan
|
||||
list network 'wan'
|
||||
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
|
||||
|
||||
config rule
|
||||
option name Repeater-Management
|
||||
option src wan
|
||||
option proto tcp
|
||||
option dest_port '22 80 8080 8181 9876'
|
||||
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,6 +0,0 @@
|
||||
config ethernet_interface 'Wan'
|
||||
option baseifname '$WAN'
|
||||
option ifname '$WAN.1'
|
||||
option name 'WAN'
|
||||
option bridge '1'
|
||||
|
||||
@@ -1,16 +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 vendorid 'Inteno_Repeater_$MAC4'
|
||||
option hostname 'Inteno_Repeater_$MAC4'
|
||||
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,86 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '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 '0'
|
||||
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*"
|
||||
],
|
||||
"acl" : [
|
||||
"admin"
|
||||
],
|
||||
"credentials" : 1,
|
||||
"reboot" : 0
|
||||
}
|
||||
@@ -1,123 +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
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward ACCEPT
|
||||
|
||||
config zone
|
||||
option name wan
|
||||
list network 'wan'
|
||||
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
|
||||
|
||||
config rule
|
||||
option name Repeater-Management
|
||||
option src wan
|
||||
option proto tcp
|
||||
option dest_port '22 80 8080 8181 9876'
|
||||
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,6 +0,0 @@
|
||||
config ethernet_interface 'Wan'
|
||||
option baseifname '$WAN'
|
||||
option ifname '$WAN.1'
|
||||
option name 'WAN'
|
||||
option bridge '1'
|
||||
|
||||
@@ -1,16 +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 vendorid 'Inteno_Repeater_$MAC4'
|
||||
option hostname 'Inteno_Repeater_$MAC4'
|
||||
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,101 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '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 '0'
|
||||
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,12 +0,0 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Fully Routed (NAT)" },
|
||||
{ "sv" : "Fullt Omdirigerad (NAT)" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "" },
|
||||
{ "sv" : "" }
|
||||
],
|
||||
"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,86 +0,0 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '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'
|
||||
|
||||
@@ -4,15 +4,15 @@ CONFIG_CCACHE=y
|
||||
CONFIG_DEBUG=y
|
||||
CONFIG_DEVEL=y
|
||||
CONFIG_LOCALMIRROR="http://mirror.inteno.se/mirror"
|
||||
CONFIG_PACKAGE_4g-support=y
|
||||
CONFIG_PACKAGE_6in4=y
|
||||
CONFIG_PACKAGE_6rd=y
|
||||
CONFIG_PACKAGE_6to4=y
|
||||
CONFIG_PACKAGE_6tunnel=y
|
||||
CONFIG_PACKAGE_alsa-lib=y
|
||||
CONFIG_PACKAGE_bind-host=y
|
||||
CONFIG_PACKAGE_chat=y
|
||||
CONFIG_PACKAGE_comgt=y
|
||||
CONFIG_PACKAGE_comgt-directip=y
|
||||
CONFIG_PACKAGE_comgt-ncm=y
|
||||
CONFIG_PACKAGE_crashlog=y
|
||||
CONFIG_PACKAGE_ddns-scripts=y
|
||||
CONFIG_PACKAGE_ds-lite=y
|
||||
@@ -31,14 +31,10 @@ CONFIG_PACKAGE_ice-client-monitor=m
|
||||
CONFIG_PACKAGE_ice-client-netrounds=m
|
||||
CONFIG_PACKAGE_ice-client-rshell=m
|
||||
CONFIG_PACKAGE_ice-client-texec=m
|
||||
# CONFIG_PACKAGE_icgroupd is not set
|
||||
CONFIG_PACKAGE_icwmp-curl=y
|
||||
CONFIG_PACKAGE_inteno-netmodes=y
|
||||
CONFIG_PACKAGE_iperf-mt=y
|
||||
CONFIG_PACKAGE_ipset=y
|
||||
CONFIG_PACKAGE_iptables=y
|
||||
CONFIG_PACKAGE_iptables-mod-conntrack-extra=y
|
||||
CONFIG_PACKAGE_iptables-mod-filter=y
|
||||
CONFIG_PACKAGE_iptables-mod-ipopt=y
|
||||
CONFIG_PACKAGE_iup=y
|
||||
CONFIG_PACKAGE_iwatchdog=y
|
||||
CONFIG_PACKAGE_juci=y
|
||||
@@ -61,6 +57,7 @@ CONFIG_PACKAGE_juci-igmpinfo=y
|
||||
CONFIG_PACKAGE_juci-inteno-backup=y
|
||||
CONFIG_PACKAGE_juci-inteno-multiwan=y
|
||||
CONFIG_PACKAGE_juci-inteno-provisioning=y
|
||||
CONFIG_PACKAGE_juci-inteno-router=y
|
||||
CONFIG_PACKAGE_juci-inteno-qos=y
|
||||
CONFIG_PACKAGE_juci-inteno-voice-client=y
|
||||
CONFIG_PACKAGE_juci-macdb=y
|
||||
@@ -70,7 +67,6 @@ CONFIG_PACKAGE_juci-mod-system=y
|
||||
CONFIG_PACKAGE_juci-natalie-dect=y
|
||||
CONFIG_PACKAGE_juci-netmode=y
|
||||
CONFIG_PACKAGE_juci-network-netifd=y
|
||||
CONFIG_PACKAGE_juci-owsd=y
|
||||
CONFIG_PACKAGE_juci-printer=y
|
||||
CONFIG_PACKAGE_juci-samba=y
|
||||
CONFIG_PACKAGE_juci-simple-gui=y
|
||||
@@ -85,10 +81,9 @@ CONFIG_PACKAGE_juci-utils=y
|
||||
CONFIG_PACKAGE_kmod-nls-base=y
|
||||
CONFIG_PACKAGE_kmod-siit=y
|
||||
CONFIG_PACKAGE_layer2interface=y
|
||||
CONFIG_PACKAGE_libcgroup-daemon=y
|
||||
CONFIG_PACKAGE_libcgroup=y
|
||||
# CONFIG_PACKAGE_libcgroup-utils is not set
|
||||
CONFIG_PACKAGE_ldd=y
|
||||
# CONFIG_PACKAGE_libcgroup=y
|
||||
# CONFIG_PACKAGE_libcgroup-daemon=y
|
||||
CONFIG_PACKAGE_libdaemon=y
|
||||
CONFIG_PACKAGE_libffmpeg-mini=y
|
||||
CONFIG_PACKAGE_libgmp=y
|
||||
@@ -100,8 +95,16 @@ CONFIG_PACKAGE_mtd-utils-deubinize=y
|
||||
CONFIG_PACKAGE_mtd-utils-imagewrite=y
|
||||
CONFIG_PACKAGE_mtd-utils-mkfs.jffs2=y
|
||||
CONFIG_PACKAGE_mtd-utils-nanddump=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubiattach=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubidetach=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubimkvol=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubinfo=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubirmvol=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubirsvol=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubiupdatevol=y
|
||||
CONFIG_PACKAGE_multiwan=y
|
||||
CONFIG_PACKAGE_ndisc6=y
|
||||
CONFIG_PACKAGE_netcheck=y
|
||||
CONFIG_PACKAGE_ntfs-3g=y
|
||||
CONFIG_PACKAGE_odhcp6c=y
|
||||
CONFIG_PACKAGE_odhcpd=y
|
||||
@@ -115,12 +118,11 @@ CONFIG_PACKAGE_power-management=y
|
||||
CONFIG_PACKAGE_ppp-mod-pppoa=y
|
||||
CONFIG_PACKAGE_ppp-mod-pppol2tp=y
|
||||
CONFIG_PACKAGE_ppp-multilink=y
|
||||
# CONFIG_PACKAGE_ppp is not set
|
||||
CONFIG_PACKAGE_qos-scripts=y
|
||||
CONFIG_PACKAGE_qrencode=y
|
||||
CONFIG_PACKAGE_questd=y
|
||||
CONFIG_PACKAGE_rdisc6=y
|
||||
CONFIG_PACKAGE_rdnssd=y
|
||||
CONFIG_PACKAGE_relayd=y
|
||||
CONFIG_PACKAGE_resolveip=y
|
||||
CONFIG_PACKAGE_rpcd=y
|
||||
CONFIG_PACKAGE_samba3=y
|
||||
@@ -132,23 +134,19 @@ CONFIG_PACKAGE_tcpdump=y
|
||||
CONFIG_PACKAGE_terminfo=y
|
||||
CONFIG_PACKAGE_tptest=y
|
||||
CONFIG_PACKAGE_traceroute6=y
|
||||
CONFIG_PACKAGE_umbim=y
|
||||
CONFIG_PACKAGE_uqmi=y
|
||||
CONFIG_PACKAGE_usb-modeswitch=y
|
||||
CONFIG_PACKAGE_usbreset=y
|
||||
CONFIG_PACKAGE_wget=y
|
||||
CONFIG_PACKAGE_wwan=y
|
||||
CONFIG_PACKAGE_xl2tpd=y
|
||||
CONFIG_PACKAGE_zoneinfo-core=y
|
||||
CONFIG_PACKAGE_zoneinfo-europe=y
|
||||
CONFIG_TARGET_CUSTOMER="INT"
|
||||
CONFIG_TARGET_ROOTFS_JFFS2=y
|
||||
CONFIG_TARGET_ROOTFS_TARGZ=y
|
||||
# CONFIG_USE_SSTRIP is not set
|
||||
CONFIG_USE_STRIP=y
|
||||
CONFIG_BUILD_LOG=y
|
||||
CONFIG_BUSYBOX_CONFIG_ADDUSER=y
|
||||
CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT=y
|
||||
CONFIG_BUSYBOX_CONFIG_CTTYHACK=y
|
||||
CONFIG_BUSYBOX_CONFIG_DELUSER=y
|
||||
# CONFIG_BUSYBOX_CONFIG_DEVMEM is not set
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_8021Q=y
|
||||
@@ -163,6 +161,7 @@ CONFIG_BUSYBOX_CONFIG_LSUSB=y
|
||||
CONFIG_BUSYBOX_CONFIG_MICROCOM=y
|
||||
CONFIG_BUSYBOX_CONFIG_RMMOD=y
|
||||
CONFIG_BUSYBOX_CONFIG_STTY=y
|
||||
CONFIG_BUSYBOX_CONFIG_TASKSET=y
|
||||
CONFIG_BUSYBOX_CONFIG_TFTP=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_2_4_MODULES is not set
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
|
||||
@@ -186,7 +185,6 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_SECURETTY=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_GET=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PUT=y
|
||||
# CONFIG_BUSYBOX_CONFIG_WGET is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_LOGIN_SCRIPTS is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_LOGIN_SESSION_AS_CHILD is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_PAM is not set
|
||||
@@ -194,4 +192,3 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PUT=y
|
||||
CONFIG_LIBCURL_CRYPTO_AUTH=y
|
||||
CONFIG_OPENVPN_openssl_ENABLE_IPROUTE2=y
|
||||
# CONFIG_SAMBA3_CONFIG_NO_PRINTING is not set
|
||||
# CONFIG_SIGNED_PACKAGES is not set
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
# Bash completion for IOPSYS "./iop" utility
|
||||
# Source this file into the curent shell or copy it into
|
||||
# /usr/share/bash-completion/completions/ and start a new shell
|
||||
# for automatic availability.
|
||||
|
||||
_iop_get_profiles()
|
||||
{
|
||||
find feeds/feed_inteno_targets/iopsys-*/ -name '*.diff' \
|
||||
|awk -F'/' '{print$NF}' \
|
||||
|awk -F. '{print$1}'
|
||||
}
|
||||
|
||||
_iop_get_models()
|
||||
{
|
||||
find feeds/feed_inteno_targets/iopsys-*/ -mindepth 1 -maxdepth 1 -type d \
|
||||
|awk -F'/' '{print$NF}' \
|
||||
|egrep '^(cg|dg|eg|vg|vox)[0-9]'
|
||||
}
|
||||
|
||||
_iop_get_model_customers()
|
||||
{
|
||||
local model=$1
|
||||
find customerconfigs/$prev -mindepth 1 -maxdepth 1 -type d \
|
||||
|awk -F'/' '{print$NF}'
|
||||
}
|
||||
|
||||
_iop()
|
||||
{
|
||||
local cur prev iopcmds
|
||||
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
||||
iopcmds="bootstrap cfe_upgrade cfe_upgrade_latest extract_core \
|
||||
feeds_update genconfig generate_tarballs install_key \
|
||||
scp_changes setup_host ssh_install_key ssh_sysupgrade \
|
||||
ssh_sysupgrade_latest ssh_sysupgrade_latest_w status \
|
||||
update_package"
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ] ; then
|
||||
|
||||
# Complete the primary iop command
|
||||
COMPREPLY=($(compgen -W "${iopcmds}" -- ${cur}))
|
||||
return 0
|
||||
|
||||
else
|
||||
|
||||
# Complete the arguments to "iopcmds"
|
||||
local cmd="${COMP_WORDS[1]}"
|
||||
case "$cmd" in
|
||||
|
||||
extract_core)
|
||||
if [ "$prev" == "-e" ] ; then
|
||||
_filedir -d
|
||||
else
|
||||
COMPREPLY=( $(compgen -W "-e -h" -- ${cur}) )
|
||||
fi
|
||||
return 0
|
||||
;;
|
||||
|
||||
genconfig)
|
||||
if [ "$prev" == "-p" ] ; then
|
||||
local profiles=$(_iop_get_profiles)
|
||||
COMPREPLY=( $(compgen -W "juci $profiles" -- ${cur}) )
|
||||
elif [[ $cur == -* ]] ; then
|
||||
COMPREPLY=( $(compgen -W "-c -h -p -s -t -u -v" -- ${cur}) )
|
||||
else
|
||||
local models=$(_iop_get_models)
|
||||
if echo $models |grep -qw -- $prev ; then
|
||||
local customers=$(_iop_get_model_customers $prev)
|
||||
COMPREPLY=( $(compgen -W "$customers" -- ${cur}) )
|
||||
else
|
||||
COMPREPLY=( $(compgen -W "$models" -- ${cur}) )
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
;;
|
||||
|
||||
*)
|
||||
# No arguments or arguments not supported yet
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
complete -F _iop ./iop
|
||||
complete -F _iop iop
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
function compile {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Please give a valid package as first argument."
|
||||
return 1
|
||||
fi
|
||||
|
||||
local cpath pck
|
||||
local lpath=$(find package/ -type l -name $1)
|
||||
local dpath=$(find package/ -type d -name $1)
|
||||
|
||||
for pck in $lpath $dpath; do
|
||||
if [ -n "$(ls $pck/Makefile 2>/dev/null)" ]; then
|
||||
cpath=$pck
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$cpath" ]; then
|
||||
make $cpath/compile V=$2
|
||||
else
|
||||
echo "Package $1 does not exist. Make sure you have installed the necessary feed."
|
||||
fi
|
||||
}
|
||||
|
||||
register_command "compile" "Compile a specific package: ./iop compile <PACKAGE_NAME> [0-99]; i.e ./iop compile netifd 99"
|
||||
@@ -1,88 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Intermediate repo for core packages
|
||||
core_repo=git@public.inteno.se:iopsys-cc-core.git
|
||||
|
||||
# Repo to which core packages should be imported
|
||||
import_repo=git@public.inteno.se:feed-inteno-openwrt.git
|
||||
import_branch=openwrt-cc-core
|
||||
|
||||
|
||||
function export_core {
|
||||
|
||||
local path=$1
|
||||
|
||||
# export paths to their own branches in an intermediate repo
|
||||
repo=$(basename $path)
|
||||
git subtree push -q --prefix=$path $core_repo $repo
|
||||
}
|
||||
|
||||
|
||||
function update_core {
|
||||
|
||||
local path=$1
|
||||
|
||||
if [ ! -d $topdir/feeds/feed_inteno_openwrt ]; then
|
||||
echo "You need to run ./iop feeds_update"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# ensure that we are synced with the remote
|
||||
cd $topdir/feeds/feed_inteno_openwrt
|
||||
git checkout $import_branch
|
||||
git pull
|
||||
|
||||
# first install subtrees if they don't already exist
|
||||
repo=$(basename $path)
|
||||
git subtree add --prefix=$repo $core_repo $repo
|
||||
|
||||
# install subtrees in feed from intermediate repo
|
||||
repo=$(basename $path)
|
||||
echo "Exporting $repo"
|
||||
git subtree pull -q -m "Exporting $repo" --prefix=$repo $core_repo $repo
|
||||
|
||||
# update import repo sync branch
|
||||
git push origin $import_branch
|
||||
}
|
||||
|
||||
function display_help {
|
||||
|
||||
echo "Usage: ./iop export_core -e path/to/package"
|
||||
}
|
||||
|
||||
function extract_core {
|
||||
|
||||
# Dir of script location
|
||||
topdir=$(pwd)
|
||||
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
display_help
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Execute user command
|
||||
while getopts "he:" opt; do
|
||||
case $opt in
|
||||
e)
|
||||
path=${OPTARG}
|
||||
echo "Extracting ${path} from core to ${import_repo}:${import_branch}"
|
||||
export_core $path
|
||||
update_core $path
|
||||
;;
|
||||
h)
|
||||
display_help
|
||||
exit 0
|
||||
;;
|
||||
\?)
|
||||
display_help
|
||||
exit -1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
register_command "extract_core" "Extract core package to feeds_inteno_openwrt"
|
||||
|
||||
|
||||
@@ -3,21 +3,25 @@
|
||||
function feeds_update {
|
||||
|
||||
developer=0
|
||||
override=1
|
||||
start=$(date -u +'%s');
|
||||
while getopts "n" opt; do
|
||||
case $opt in
|
||||
n)
|
||||
override=0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
git remote -v | grep -q http || developer=1
|
||||
|
||||
#while getopts "d" opt; do
|
||||
# case $opt in
|
||||
# d)
|
||||
# developer=1
|
||||
# ;;
|
||||
# \?)
|
||||
# echo "Invalid option: -$OPTARG" >&2
|
||||
# exit 1
|
||||
# ;;
|
||||
# esac
|
||||
#done
|
||||
|
||||
cp .config .genconfig_config_bak
|
||||
|
||||
rm -rf package/feeds
|
||||
|
||||
#if -d argument is passed, clone feeds with ssh instead of http
|
||||
if [ $developer == 1 ]; then
|
||||
./scripts/feeds update -g
|
||||
@@ -25,21 +29,22 @@ function feeds_update {
|
||||
./scripts/feeds update
|
||||
fi
|
||||
|
||||
# replace core packages with iopsys versions
|
||||
if [ $override == 1 ]; then
|
||||
./scripts/feeds install -f -p feed_inteno_openwrt -a
|
||||
fi
|
||||
|
||||
# targets need to be installed explicitly
|
||||
./scripts/feeds install -p feed_inteno_targets iopsys-brcm63xx-mips
|
||||
./scripts/feeds install -p feed_inteno_targets iopsys-brcm63xx-arm
|
||||
./scripts/feeds install -p feed_inteno_targets iopsys-ramips
|
||||
|
||||
# install all packages
|
||||
./scripts/feeds install -f -p feed_inteno_openwrt -a
|
||||
./scripts/feeds install -f -p feed_inteno_juci -a
|
||||
./scripts/feeds install -f -p feed_inteno_packages -a
|
||||
./scripts/feeds install -f -p feed_inteno_broadcom -a
|
||||
./scripts/feeds install -f -p feed_inteno_targets iopsys-brcm63xx-mips
|
||||
./scripts/feeds install -f -p feed_inteno_targets iopsys-brcm63xx-arm
|
||||
./scripts/feeds install -a
|
||||
./scripts/feeds uninstall asterisk18
|
||||
./scripts/feeds uninstall zstream
|
||||
./scripts/feeds uninstall mtd-utils
|
||||
./scripts/feeds install -f -p feed_inteno_packages mtd-utils
|
||||
./scripts/feeds uninstall qrencode
|
||||
./scripts/feeds install -f -p feed_inteno_packages qrencode
|
||||
|
||||
# remove broken symlinks ( for packages that are no longer in the feed )
|
||||
find -L package/feeds -maxdepth 2 -type l -delete
|
||||
rm -rf package/feeds/oldpackages/libzstream # have to run this for now since uninstall is not working every time
|
||||
|
||||
cp .genconfig_config_bak .config
|
||||
make defconfig
|
||||
|
||||
@@ -1,352 +1,262 @@
|
||||
#!/bin/bash
|
||||
|
||||
function genconfig {
|
||||
export CLEAN=0
|
||||
export IMPORT=1
|
||||
export SRCTREEOVERR=0
|
||||
export FILEDIR="files/"
|
||||
export THEMEDIR="themes"
|
||||
CURRENT_CONFIG_FILE=".current_config_file"
|
||||
export CONFIGPATH="package/feeds/feed_inteno_packages/iop/configs"
|
||||
CUSTPATH="customerconfigs"
|
||||
CUSTREPO="git@private.inteno.se:customerconfigs"
|
||||
export CUSTCONF="customerconfigs/customers"
|
||||
export VERBOSE=0
|
||||
export DEVELOPER=0
|
||||
LOCAL_MIRROR="http://mirror.inteno.se/mirror"
|
||||
export CLEAN=0
|
||||
export IMPORT=0
|
||||
export SRCTREEOVERR=0
|
||||
export FILEDIR="files/"
|
||||
export CONFIGPATH="package/feeds/feed_inteno_packages/iop/configs"
|
||||
export CUSTCONF="customerconfigs"
|
||||
export VERBOSE=0
|
||||
export DEVELOPER=0
|
||||
export TMPDIR="/tmp/builder/"
|
||||
LOCAL_MIRROR="http://mirror.inteno.se/mirror"
|
||||
|
||||
iopsys_brcm63xx_mips="cg300 cg301 dg150 dg150v2 dg150alv2 dg200 dg200al dg301 dg301al eg300 vg50 vox25"
|
||||
iopsys_brcm63xx_arm="dg400 eg400"
|
||||
iopsys_ramips="ex400"
|
||||
ramips="mt7621"
|
||||
target="bogus"
|
||||
masterconfig=1
|
||||
iopsys_brcm63xx_mips="cg300 cg301 dg150 dg150v2 dg150alv2 dg200 dg200al dg301 dg301al eg300 vg50 vox25"
|
||||
iopsys_brcm63xx_arm="dg400"
|
||||
target="bogus"
|
||||
|
||||
set_target() {
|
||||
|
||||
set_target()
|
||||
{
|
||||
local profile=$1
|
||||
|
||||
for p in $iopsys_brcm63xx_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_mips"
|
||||
return
|
||||
fi
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_mips"
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_brcm63xx_arm; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_arm"
|
||||
return
|
||||
fi
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_arm"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
for p in $iopsys_ramips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_ramips"
|
||||
return
|
||||
fi
|
||||
|
||||
git remote -v | grep -q http || {
|
||||
DEVELOPER=1
|
||||
|
||||
bcmAllowed=0
|
||||
iceAllowed=0
|
||||
endptAllowed=0
|
||||
natalieAllowed=0
|
||||
|
||||
allowedRepos="$(ssh -o ConnectTimeout=5 git@private.inteno.se 2>/dev/null | grep -w 'R\|W' | awk '{print$NF}')"
|
||||
for repo in $allowedRepos; do
|
||||
case $repo in
|
||||
bcmkernel) bcmAllowed=1 ;;
|
||||
ice-client) iceAllowed=1 ;;
|
||||
endptcfg) endptAllowed=1 ;;
|
||||
natalie-dect*) natalieAllowed=1 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
for p in $ramips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="ramips"
|
||||
masterconfig=0
|
||||
return
|
||||
fi
|
||||
done
|
||||
v() {
|
||||
[ "$VERBOSE" -ge 1 ] && echo "$@"
|
||||
}
|
||||
|
||||
}
|
||||
usage() {
|
||||
echo
|
||||
echo 1>&2 "Usage: $0 [OPTIONS] BoardConfig Customerconfig"
|
||||
echo
|
||||
echo " -c, remove all files under ./files and import from config "
|
||||
echo " -v, verbose"
|
||||
echo " -u, Update customer config before applying"
|
||||
echo " -p, set profile (if exists)"
|
||||
echo " -t, use latest git tag and number of commits since as version for the build"
|
||||
echo " -s, enable 'Package source tree override'"
|
||||
echo
|
||||
echo "BoardConfig ex "
|
||||
ls -1 configs
|
||||
if [ -d "$CUSTCONF/$1" ]; then
|
||||
echo "Customerconfig ex"
|
||||
ls $CUSTCONF/*
|
||||
fi
|
||||
echo
|
||||
echo "Example ./genconfig vg50 TELIA"
|
||||
echo "(if no customerconfig is chosen the Inteno Config will be used)"
|
||||
echo
|
||||
exit 127
|
||||
}
|
||||
|
||||
git remote -v | grep -q http || {
|
||||
DEVELOPER=1
|
||||
use_local_mirror()
|
||||
{
|
||||
if wget -T 3 -t 2 -O /dev/null $LOCAL_MIRROR >/dev/null 2>/dev/null
|
||||
then
|
||||
echo "mirror [$LOCAL_MIRROR] exists. Using local mirror"
|
||||
sed -i "s;CONFIG_LOCALMIRROR=.*;CONFIG_LOCALMIRROR=\"$LOCAL_MIRROR\";" .config
|
||||
else
|
||||
echo "mirror [$LOCAL_MIRROR] does not exist. Not using local mirror"
|
||||
fi
|
||||
}
|
||||
|
||||
bcmAllowed=0
|
||||
iceAllowed=0
|
||||
endptAllowed=0
|
||||
natalieAllowed=0
|
||||
|
||||
allowedRepos="$(ssh -o ConnectTimeout=5 git@private.inteno.se 2>/dev/null | grep -w 'R\|W' | awk '{print$NF}')"
|
||||
for repo in $allowedRepos; do
|
||||
case $repo in
|
||||
bcmkernel) bcmAllowed=1 ;;
|
||||
ice-client) iceAllowed=1 ;;
|
||||
endptcfg) endptAllowed=1 ;;
|
||||
natalie-dect*) natalieAllowed=1 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
v() {
|
||||
[ "$VERBOSE" -ge 1 ] && echo "$@"
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo
|
||||
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer ]"
|
||||
echo
|
||||
echo -e " -c|--clean\tRemove all files under ./files and import from config "
|
||||
echo -e " -v|--verbose\tVerbose"
|
||||
echo -e " -n|--no-update\tDo NOT! Update customer config before applying"
|
||||
echo -e " -p|--profile\tSet profile (if exists) default juci"
|
||||
echo -e " -s|--override\tEnable 'Package source tree override'"
|
||||
echo -e " -h|--help\tShow this message"
|
||||
echo -e " -l|--list [customer]\tList all Customers or all boards for one customer"
|
||||
echo -e " -a|--list-all\tList all Customers and their board types"
|
||||
echo
|
||||
echo "Example ./iop genconfig vg50 TELIA"
|
||||
echo "(if no customerconfig is chosen the Inteno Config will be used)"
|
||||
echo
|
||||
exit 0
|
||||
}
|
||||
|
||||
list_customers()
|
||||
{
|
||||
local ALL="$1"
|
||||
local CUSTOMER="$2"
|
||||
if [ "$CUSTOMER" -a -d "$CUSTCONF/$CUSTOMER" ]; then
|
||||
local boards="$(ls -1 "$CUSTCONF/$CUSTOMER" | grep -v common)"
|
||||
if [ "$boards" ]; then
|
||||
echo "$CUSTOMER has following boards:"
|
||||
for board in $boards; do
|
||||
echo -e "\t$board"
|
||||
done
|
||||
else
|
||||
echo "No boards found for $CUSTOMER"
|
||||
fi
|
||||
elif [ "$CUSTOMER" ]; then
|
||||
echo "No customer called $CUSTOMER"
|
||||
exit 1
|
||||
elif [ -d $CUSTCONF ]; then
|
||||
local customers="$(ls -1 $CUSTCONF)"
|
||||
if [ "$customers" -a "$1" == 1 ]; then
|
||||
for customer in $customers; do
|
||||
echo $customer
|
||||
local boards="$(ls -1 $CUSTCONF/$customer | grep -v common)"
|
||||
if [ "$boards" ]; then
|
||||
for board in $boards; do
|
||||
echo -e "\t$board"
|
||||
done
|
||||
else
|
||||
echo "has no boards"
|
||||
fi
|
||||
done
|
||||
elif [ "$customers" ]; then
|
||||
echo -e "$customers"
|
||||
else
|
||||
echo "no customers found"
|
||||
fi
|
||||
else
|
||||
echo "No $CUSTCONF folder found"
|
||||
fi
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
use_local_mirror()
|
||||
{
|
||||
if wget -T 3 -t 2 -O /dev/null $LOCAL_MIRROR >/dev/null 2>/dev/null; then
|
||||
echo "mirror [$LOCAL_MIRROR] exists. Using local mirror"
|
||||
sed -i "s;CONFIG_LOCALMIRROR=.*;CONFIG_LOCALMIRROR=\"$LOCAL_MIRROR\";" .config
|
||||
else
|
||||
echo "mirror [$LOCAL_MIRROR] does not exist. Not using local mirror"
|
||||
fi
|
||||
}
|
||||
|
||||
generate_config()
|
||||
{
|
||||
generate_config()
|
||||
{
|
||||
DIFFFILE="$1"
|
||||
MASTERFILE="$2"
|
||||
while read p; do
|
||||
v "$p"
|
||||
sed -r -i "$p" $MASTERFILE
|
||||
v "$p"
|
||||
sed -r -i "$p" $MASTERFILE
|
||||
done < $DIFFFILE
|
||||
}
|
||||
}
|
||||
|
||||
setup_dirs()
|
||||
{
|
||||
if [ $DEVELOPER -eq 1 ]; then
|
||||
if [ ! -d "$CUSTPATH" ]; then
|
||||
git clone "$CUSTREPO" "$CUSTPATH"
|
||||
elif [ $IMPORT -eq 1 ]; then
|
||||
cd $CUSTPATH
|
||||
v "git pull"
|
||||
git pull
|
||||
cd - >/dev/null #go back
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d "$FILEDIR" ]; then
|
||||
mkdir -p $FILEDIR
|
||||
elif [ -d "$FILEDIR" -a $CLEAN -eq 1 ]; then
|
||||
v "rm -rf $FILEDIR*"
|
||||
rm -rf $FILEDIR*
|
||||
fi
|
||||
|
||||
if [ ! -d "$THEMEDIR" ]; then
|
||||
mkdir -p $THEMEDIR
|
||||
elif [ -d "$THEMEDIR" -a $CLEAN -eq 1 ]; then
|
||||
v "rm -rf $THEMEDIR/*"
|
||||
rm -rf $THEMEDIR/*
|
||||
fi
|
||||
}
|
||||
|
||||
create_and_copy_files()
|
||||
{
|
||||
local BOARDTYPE=$1
|
||||
local CUSTOMER=$2
|
||||
|
||||
# Validate seleced board and customer
|
||||
set_target $BOARDTYPE
|
||||
if [ $target == "bogus" ]; then
|
||||
echo "Hardware profile does not exist"
|
||||
exit 1
|
||||
elif [ -n "$CUSTOMER" -a ! -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/" ]; then
|
||||
echo "Customer profile does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Generate base config
|
||||
# Used only for iopsys targets, not openwrt targets
|
||||
rm -f .config
|
||||
if [ $masterconfig -eq 1 ]; then
|
||||
v "Config $BOARDTYPE selected"
|
||||
v "cp $CONFIGPATH/config .config"
|
||||
cp $CONFIGPATH/config .config
|
||||
fi
|
||||
|
||||
# Apply profile diff to master config if selected
|
||||
if [ -n "$PROFILE" ]; then
|
||||
if [ -e "$CONFIGPATH/$PROFILE.diff" ]; then
|
||||
cat $CONFIGPATH/$PROFILE.diff >> .config
|
||||
elif [ "$PROFILE" == "juci" ]; then
|
||||
v "Default profile (juci) is selected."
|
||||
else
|
||||
echo "ERROR: profile $PROFILE does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
v "No profile selected! Using default."
|
||||
fi
|
||||
|
||||
# Set target and profile
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
|
||||
|
||||
echo "$CUSTOMER $BOARDTYPE" > $CURRENT_CONFIG_FILE
|
||||
|
||||
# Add customerconfig diff if a customer is selected
|
||||
if [ -n "$CUSTOMER" ]; then
|
||||
if [ -d "$CUSTCONF/$CUSTOMER/common/fs" ]; then
|
||||
v "cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR"
|
||||
cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR
|
||||
fi
|
||||
if [ -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/fs" ]; then
|
||||
v "cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR"
|
||||
cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR
|
||||
fi
|
||||
if [ -d "$CUSTCONF/$CUSTOMER/juci-theme" ]; then
|
||||
customer="$(echo $CUSTOMER | tr 'A-Z' 'a-z')"
|
||||
v "cp -ar $CUSTCONF/$CUSTOMER/juci-theme $THEMEDIR/juci-theme-$customer"
|
||||
cp -ar $CUSTCONF/$CUSTOMER/juci-theme $THEMEDIR/juci-theme-$customer
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/common/common.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/common/common.diff >> .config
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff >> .config
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set target version
|
||||
local GIT_TAG=$(git describe --abbrev=0 --tags)
|
||||
echo "CONFIG_TARGET_VERSION=\"${GIT_TAG}\"" >> .config
|
||||
|
||||
# Enable Pckage source tree override if selected
|
||||
[ $SRCTREEOVERR -eq 1 ] && echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
|
||||
|
||||
# developer mode selected ?
|
||||
if [ $DEVELOPER -eq 1 ]; then
|
||||
# rewrite url to clone with ssh instead of http
|
||||
echo "CONFIG_DEVEL=y" >>.config
|
||||
echo "CONFIG_GITMIRROR_REWRITE=y" >>.config
|
||||
[ $bcmAllowed -eq 0 ] && echo "CONFIG_BCM_OPEN=y" >> .config
|
||||
[ $iceAllowed -eq 0 ] && echo "CONFIG_ICE_OPEN=y" >> .config
|
||||
[ $endptAllowed -eq 0 ] && echo "CONFIG_ENDPT_OPEN=y" >> .config
|
||||
[ $natalieAllowed -eq 0 ] && echo "CONFIG_NATALIE_OPEN=y" >> .config
|
||||
else
|
||||
echo "CONFIG_BCM_OPEN=y" >> .config
|
||||
echo "CONFIG_ICE_OPEN=y" >> .config
|
||||
echo "CONFIG_ENDPT_OPEN=y" >> .config
|
||||
echo "CONFIG_NATALIE_OPEN=y" >> .config
|
||||
fi
|
||||
|
||||
# Force regeneration of themes
|
||||
touch package/feeds/feed_inteno_juci/juci/Makefile
|
||||
|
||||
# Force regeneration of kernel Makefile
|
||||
# Needed to disable kmods for iopsys-brcm targets
|
||||
touch package/kernel/linux/Makefile
|
||||
|
||||
# Set default values based on selected parameters
|
||||
v "$(make defconfig 2>&1)"
|
||||
|
||||
# Temporary fixup for juci/luci profile
|
||||
if [ "$PROFILE" == "luci" ]; then
|
||||
sed -i '/CONFIG_DEFAULT_juci/d' .config
|
||||
sed -i '/CONFIG_PACKAGE_juci/d' .config
|
||||
sed -i '/CONFIG_PACKAGE_uhttpd/d' .config
|
||||
fi
|
||||
|
||||
if [ $masterconfig -eq 1 ]; then
|
||||
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
|
||||
fi
|
||||
|
||||
# Clean base-file package to force rebuild when changing profile
|
||||
v "$(make package/base-files/clean 2>&1)"
|
||||
}
|
||||
|
||||
####### main #####
|
||||
if [ ! -e tmp/.iop_bootstrap ]; then
|
||||
echo "You have not installed feeds. Running genconfig in this state would create a non functional configuration."
|
||||
echo "Run: iop feeds_update"
|
||||
exit 0
|
||||
setup_dirs()
|
||||
{
|
||||
if [ $DEVELOPER -eq 1 ]; then
|
||||
if [ ! -d "$CUSTCONF" ]; then
|
||||
git clone git@private.inteno.se:customerconfigs
|
||||
elif [ $IMPORT -eq 1 ]; then
|
||||
cd customerconfigs
|
||||
v "git pull"
|
||||
git pull
|
||||
cd ..
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo Current profile:
|
||||
cat $CURRENT_CONFIG_FILE
|
||||
echo "Try ./iop genconfig -h' to get instructions if you want to change current config"
|
||||
exit 0
|
||||
|
||||
if [ ! -d "$FILEDIR" ]; then
|
||||
mkdir $FILEDIR
|
||||
elif [ -d "$FILEDIR" -a $CLEAN -eq 1 ]; then
|
||||
v "rm -rf $FILEDIR*"
|
||||
rm -rf $FILEDIR*
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
create_and_copy_files()
|
||||
{
|
||||
local BOARDTYPE=$1
|
||||
local CUSTOMER=$2
|
||||
|
||||
# Validate seleced board and customer
|
||||
set_target $BOARDTYPE
|
||||
if [ $target == "bogus" ]; then
|
||||
echo "Hardware profile does not exist"
|
||||
exit 1
|
||||
elif [ -n "$CUSTOMER" -a ! -d "$CUSTCONF/$BOARDTYPE/$CUSTOMER/" ]; then
|
||||
echo "Customer profile does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Clean base-file package to force rebuild when changing profile
|
||||
make package/base-files/clean
|
||||
|
||||
# Base config on master
|
||||
v "Config $BOARDTYPE selected"
|
||||
v "cp $CONFIGPATH/config .config"
|
||||
cp $CONFIGPATH/config .config
|
||||
|
||||
# Apply profile diff to master config if selected
|
||||
if [ -n "$PROFILE" ]; then
|
||||
if [ -e "$CONFIGPATH/$PROFILE.diff" ]; then
|
||||
cat $CONFIGPATH/$PROFILE.diff >> .config
|
||||
elif [ "$PROFILE" == "juci" ]; then
|
||||
v "Default profile (juci) is selected."
|
||||
else
|
||||
echo "ERROR: profile $PROFILE does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
v "No profile selected! Using default."
|
||||
fi
|
||||
|
||||
# Set target and profile
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
|
||||
|
||||
# Add customerconfig diff if a customer is selected
|
||||
if [ -n "$CUSTOMER" ]; then
|
||||
echo "$BOARDTYPE $CUSTOMER" > .current_config_file
|
||||
if [ -d "$CUSTCONF/$BOARDTYPE/$CUSTOMER/fs" ]; then
|
||||
v "cp -rLp $CUSTCONF/$BOARDTYPE/$CUSTOMER/fs/* $FILEDIR"
|
||||
cp -rLp $CUSTCONF/$BOARDTYPE/$CUSTOMER/fs/* $FILEDIR
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff" ]; then
|
||||
v "Apply $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff"
|
||||
cat $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff >> .config
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set target version
|
||||
local GIT_TAG=$(git describe --abbrev=0 --tags)
|
||||
echo "CONFIG_TARGET_VERSION=\"${GIT_TAG}\"" >> .config
|
||||
|
||||
|
||||
# Enable Pckage source tree override if selected
|
||||
[ $SRCTREEOVERR -eq 1 ] && \
|
||||
echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
|
||||
|
||||
|
||||
# developer mode selected ?
|
||||
if [ $DEVELOPER -eq 1 ]; then
|
||||
# rewrite url to clone with ssh instead of http
|
||||
echo "CONFIG_GITMIRROR_REWRITE=y" >>.config
|
||||
[ $bcmAllowed -eq 0 ] && echo "CONFIG_BCM_OPEN=y" >> .config
|
||||
[ $iceAllowed -eq 0 ] && echo "CONFIG_ICE_OPEN=y" >> .config
|
||||
[ $endptAllowed -eq 0 ] && echo "CONFIG_ENDPT_OPEN=y" >> .config
|
||||
[ $natalieAllowed -eq 0 ] && echo "CONFIG_NATALIE_OPEN=y" >> .config
|
||||
else
|
||||
while [ -n "$1" ]; do
|
||||
case "$1" in
|
||||
|
||||
-c|--clean) export CLEAN=1;;
|
||||
-n|--no-update) export IMPORT=0;;
|
||||
-v|--verbose) export VERBOSE="$(($VERBOSE + 1))";;
|
||||
-p|--profile) export PROFILE="$2"; shift;;
|
||||
-s|--override) export SRCTREEOVERR=1;;
|
||||
-h|--help) usage;;
|
||||
-l|--list) list_customers 0 $2;;
|
||||
-a|--list-all)list_customers 1;;
|
||||
-*)
|
||||
echo "Invalid option: $1 "
|
||||
echo "Try -h or --help for more information."
|
||||
exit 1
|
||||
;;
|
||||
*) break;;
|
||||
esac
|
||||
shift;
|
||||
done
|
||||
setup_dirs
|
||||
create_and_copy_files "$1" "$2"
|
||||
|
||||
if [ $masterconfig -eq 1 ]; then
|
||||
use_local_mirror
|
||||
fi
|
||||
echo "CONFIG_BCM_OPEN=y" >> .config
|
||||
echo "CONFIG_ICE_OPEN=y" >> .config
|
||||
echo "CONFIG_ENDPT_OPEN=y" >> .config
|
||||
echo "CONFIG_NATALIE_OPEN=y" >> .config
|
||||
fi
|
||||
|
||||
# Set default values based on selected parameters
|
||||
make defconfig
|
||||
|
||||
# Temporary fixup for juci/luci profile
|
||||
if [ "$PROFILE" == "luci" ]; then
|
||||
sed -i '/CONFIG_DEFAULT_juci/d' .config
|
||||
sed -i '/CONFIG_PACKAGE_juci/d' .config
|
||||
sed -i '/CONFIG_PACKAGE_uhttpd/d' .config
|
||||
fi
|
||||
|
||||
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
|
||||
}
|
||||
|
||||
####### main #####
|
||||
if [ ! -e tmp/.iop_bootstrap ]; then
|
||||
echo "You have not installed feeds. Running genconfig in this state would create a non functional configuration."
|
||||
echo "Run: iop feeds_update"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo Current profile:
|
||||
cat .current_config_file
|
||||
echo "Try ./iop_get_config.sh -h' to get instructions if you want to change current config"
|
||||
exit 0
|
||||
else
|
||||
|
||||
while [ -n "$1" ]; do
|
||||
case "$1" in
|
||||
|
||||
-c) export CLEAN=1;;
|
||||
-u) export IMPORT=1;;
|
||||
-v) export VERBOSE="$(($VERBOSE + 1))";;
|
||||
-p) export PROFILE="$2"; shift;;
|
||||
-t) export USE_TAG=1;;
|
||||
-s) export SRCTREEOVERR=1;;
|
||||
-h) usage;;
|
||||
-*)
|
||||
echo "Invalid option: $1 "
|
||||
echo "Try -h' for more information."
|
||||
exit 1
|
||||
;;
|
||||
*) break;;
|
||||
esac
|
||||
shift;
|
||||
done
|
||||
[ -d $TMPDIR ] || mkdir $TMPDIR
|
||||
setup_dirs
|
||||
create_and_copy_files "$1" "$2"
|
||||
[ -d $TMPDIR ] && rm -rf $TMPDIR
|
||||
use_local_mirror
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
register_command "genconfig" "Generate configuration for board and customer"
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
|
||||
build_bcmkernel_consumer() {
|
||||
local tarfile bcmkernelcommith
|
||||
bcmkernelcommith=$(grep -w "PKG_SOURCE_VERSION:" $curdir/feeds/feed_inteno_broadcom/bcmkernel/$sdkversion.mk | cut -d'=' -f2)
|
||||
# do not build bcmopen sdk if it was already built before
|
||||
ssh $SERVER "ls $FPATH/bcmopen-$profile-$bcmkernelcommith.tar.gz" && return
|
||||
ssh inteno@iopsys.inteno.se "ls public/www/iopsys/consumer/bcmopen-$profile-$bcmkernelcommith.tar.gz" && return
|
||||
cd ./build_dir/target-*_uClibc-0.9.33.*/bcmkernel-3.4-$sdkversion/bcm963xx/release
|
||||
sh do_consumer_release -p $profile -y
|
||||
tarfile='out/bcm963xx_*_consumer.tar.gz'
|
||||
[ $(ls -1 $tarfile |wc -l) -ne 1 ] && echo "Too many tar files: '$tarfile'" && return
|
||||
scp $tarfile $SERVER:$FPATH/bcmopen-$profile-$bcmkernelcommith.tar.gz
|
||||
scp $tarfile inteno@ihgsp.inteno.se:/home/inteno/public/www/iopsys/consumer/bcmopen-$profile-$bcmkernelcommith.tar.gz
|
||||
rm -f $tarfile
|
||||
cd $curdir
|
||||
}
|
||||
@@ -21,12 +22,12 @@ build_natalie_consumer() {
|
||||
grep -q "CONFIG_TARGET_NO_DECT=y" .config && return
|
||||
natalieversion=$(grep -w "PKG_VERSION:" ./feeds/feed_inteno_packages/natalie-dect/Makefile | cut -d'=' -f2)
|
||||
nataliecommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/feed_inteno_packages/natalie-dect/Makefile | cut -d'=' -f2)
|
||||
ssh $SERVER "ls $FPATH/natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz" && return
|
||||
ssh inteno@iopsys.inteno.se "ls public/www/iopsys/consumer/natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz" && return
|
||||
cd ./build_dir/target-*_uClibc-0.9.33.*/natalie-dect-$natalieversion/
|
||||
mkdir natalie-dect-open-$natalieversion
|
||||
cp NatalieFpCvm6362/Src/Projects/NatalieV3/FpCvm/Linux6362/dects.ko natalie-dect-open-$natalieversion/dect.ko
|
||||
tar -czv natalie-dect-open-$natalieversion/ -f natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz
|
||||
scp natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz $SERVER:$FPATH/
|
||||
scp natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz inteno@iopsys.inteno.se:/home/inteno/public/www/iopsys/consumer/
|
||||
cp natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz $curdir/
|
||||
rm -rf natalie-dect-open-$natalieversion
|
||||
rm -f natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz
|
||||
@@ -39,12 +40,12 @@ build_endptcfg_consumer() {
|
||||
grep -q "CONFIG_TARGET_NO_VOICE=y" .config && return
|
||||
endptversion=$(grep -w "PKG_VERSION:" ./feeds/feed_inteno_packages/endptcfg/Makefile | cut -d'=' -f2)
|
||||
endptcommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/feed_inteno_packages/endptcfg/Makefile | cut -d'=' -f2)
|
||||
ssh $SERVER "ls $FPATH/endptcfg-$profile-$endptversion-$endptcommith.tar.gz" && return
|
||||
ssh inteno@iopsys.inteno.se "ls public/www/iopsys/consumer/endptcfg-$profile-$endptversion-$endptcommith.tar.gz" && return
|
||||
cd ./build_dir/target-*_uClibc-0.9.33.*/endptcfg-$endptversion/
|
||||
mkdir endptcfg-open-$endptversion
|
||||
cp endptcfg endptcfg-open-$endptversion/
|
||||
tar -czv endptcfg-open-$endptversion/ -f endptcfg-$profile-$endptversion-$endptcommith.tar.gz
|
||||
scp endptcfg-$profile-$endptversion-$endptcommith.tar.gz $SERVER:$FPATH/
|
||||
scp endptcfg-$profile-$endptversion-$endptcommith.tar.gz inteno@iopsys.inteno.se:/home/inteno/public/www/iopsys/consumer/
|
||||
cp endptcfg-$profile-$endptversion-$endptcommith.tar.gz $curdir/
|
||||
rm -rf endptcfg-open-$endptversion
|
||||
rm -f endptcfg-$profile-$endptversion-$endptcommith.tar.gz
|
||||
@@ -58,19 +59,17 @@ build_ice_consumer() {
|
||||
icebasever=$(grep -w "BASE_PKG_VERSION:" ./feeds/feed_inteno_packages/ice-client/Makefile | cut -d'=' -f2)
|
||||
icerelease=$(grep -w "PKG_RELEASE:" ./feeds/feed_inteno_packages/ice-client/Makefile | cut -d'=' -f2)
|
||||
iceversion=$icebasever$icerelease
|
||||
ssh $SERVER "ls $FPATH/ice-client-$profile-$iceversion-$icecommith.tar.gz" && return
|
||||
ssh inteno@iopsys.inteno.se "ls public/www/iopsys/consumer/ice-client-$profile-$iceversion-$icecommith.tar.gz" && return
|
||||
cd ./build_dir/target-*_uClibc-0.9.33.*/ice-client-$icebasever/ipkg-*
|
||||
tar -czv ice-client -f ice-client-$profile-$iceversion-$icecommith.tar.gz
|
||||
scp ice-client-$profile-$iceversion-$icecommith.tar.gz $SERVER:$FPATH/
|
||||
scp ice-client-$profile-$iceversion-$icecommith.tar.gz inteno@iopsys.inteno.se:/home/inteno/public/www/iopsys/consumer/
|
||||
cp ice-client-$profile-$iceversion-$icecommith.tar.gz $curdir/
|
||||
rm -f ice-client-$profile-$iceversion-$icecommith.tar.gz
|
||||
cd $curdir
|
||||
}
|
||||
|
||||
function generate_tarballs {
|
||||
|
||||
SERVER="god@software.inteno.se"
|
||||
FPATH="/var/www/html/iopsys/consumer"
|
||||
function generate_tarballs {
|
||||
|
||||
git remote -v | grep -q http && return # do not continue if this is an open SDK environment
|
||||
|
||||
@@ -85,5 +84,5 @@ function generate_tarballs {
|
||||
|
||||
}
|
||||
|
||||
register_command "generate_tarballs" "Generate tarballs for Open SDK"
|
||||
register_command "generate_tarballs" "Generate tarballs for openstk"
|
||||
|
||||
|
||||
177
iop/scripts/setup_host.sh
Executable file
177
iop/scripts/setup_host.sh
Executable file
@@ -0,0 +1,177 @@
|
||||
#!/bin/bash
|
||||
|
||||
function setup_host {
|
||||
|
||||
if [ "$(whoami)" != "root" ]; then
|
||||
echo "Please run this script as root!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
packages_all="bison flex g++ g++-multilib zlib1g-dev gettext gawk svn-buildpackage libncurses5-dev ncurses-term git automake gtk-doc-tools liblzo2-dev uuid-dev execstack"
|
||||
packages_perl="libconvert-binary-c-perl libdigest-crc-perl"
|
||||
packages_x64="libc6-dev-i386 lib32z1"
|
||||
packages_npm="npm nodejs yui-compressor"
|
||||
|
||||
curdir=$(pwd)
|
||||
|
||||
#===============#
|
||||
# Prerequisites #
|
||||
#===============#
|
||||
|
||||
mysh=$(ls -hl /bin/sh | awk -F'[ ,/]' '{print$NF}')
|
||||
if [ "$mysh" != "bash" ]; then
|
||||
echo "On Debian based systems, e.g. Ubuntu, /bin/sh must point to bash instead of $mysh"
|
||||
read -p "Do you approve this change (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
rm -f /bin/sh
|
||||
ln -s bash /bin/sh
|
||||
else
|
||||
echo "Warning! You haven't pointed /bin/sh to bash."
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "The packages below must be installed"
|
||||
echo $packages_all $packages_perl
|
||||
read -p "Do you approve insallation of these packages (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
apt-get install $packages_all
|
||||
apt-get install $packages_perl
|
||||
else
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(uname -m | awk '{print$1}')" == "x86_64" ]; then
|
||||
echo "You are running a Linux Distribution based on 64-bit kernel"
|
||||
echo "The packages below must be installed"
|
||||
echo $packages_x64
|
||||
read -p "Do you approve insallation of these packages (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
apt-get install $packages_x64
|
||||
else
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "The packages below must be installed in order to be able to compile JUCI"
|
||||
echo $packages_npm
|
||||
read -p "Do you approve insallation of these packages (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
apt-get install npm nodejs yui-compressor
|
||||
npm install -g npm
|
||||
npm install -g grunt-cli
|
||||
npm install -g mocha
|
||||
npm install -g bower
|
||||
npm install -g uglify-js
|
||||
npm install -g less
|
||||
|
||||
if [ "$(which node)" == "" ]; then
|
||||
NODEJS=$(which nodejs)
|
||||
if [ "$NODEJS" != "" ]; then
|
||||
read -p "Found nodejs executable at $(which nodejs), but no path to 'node'. Do you want to create a symlink? (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
ln -s "$NODEJS" "/usr/bin/node"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
user=$(who | head -1 | awk '{print$1}')
|
||||
[ -n $user ] && chown -R $user:$user /home/$user/.npm/
|
||||
else
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the Broadcom toolchain from here and unpack the mips/arm package to /opt:
|
||||
echo -n "Checking for Broadcom MIPS toolchain: "
|
||||
if [ -d /opt/toolchains/crosstools-mips-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21 ]; then
|
||||
install_mips=0
|
||||
echo "YES"
|
||||
else
|
||||
install_mips=1
|
||||
echo "NO"
|
||||
fi
|
||||
|
||||
echo -n "Checking for Broadcom ARM toolchain: "
|
||||
if [ -d /opt/toolchains/crosstools-arm-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-NPTL ]; then
|
||||
install_arm=0
|
||||
echo "YES"
|
||||
else
|
||||
install_arm=1
|
||||
echo "NO"
|
||||
fi
|
||||
|
||||
if [ $install_mips -eq 1 -o $install_arm -eq 1 ]; then
|
||||
read -p "Do you approve insallation of missing toolchains (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
echo "Downloading toolchain"
|
||||
else
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ~
|
||||
wget http://iopsys.inteno.se/iopsys/toolchain/crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2-full.tar.bz2
|
||||
tar jxf crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2-full.tar.bz2
|
||||
cd /
|
||||
|
||||
if [ $install_mips -eq 1 ]; then
|
||||
echo "Installing MIPS toolchain"
|
||||
tar jxf ~/crosstools-mips-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2.tar.bz2
|
||||
fi
|
||||
|
||||
if [ $install_arm -eq 1 ]; then
|
||||
echo "Installing ARM toolchain"
|
||||
tar jxf ~/crosstools-arm-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-NPTL.Rel1.2.tar.bz2
|
||||
fi
|
||||
|
||||
rm -f ~/crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-sources.tar.bz2
|
||||
rm -f ~/crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2-full.tar.bz2
|
||||
rm -f ~/crosstools-mip*-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2.tar.bz2
|
||||
rm -f ~/crosstools-arm-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-NPTL.Rel1.2.tar.bz2
|
||||
fi
|
||||
|
||||
gcc_ver=$(ls -l /usr/bin/gcc-[0-9]* | head -1 | awk '{print$NF}' | cut -d'-' -f2)
|
||||
if [ "$gcc_ver" != "4.8" ]; then
|
||||
echo "Your current gcc version is $gcc_ver, but it must be changed to 4.8"
|
||||
read -p "Do you approve this change (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
apt-get install gcc-4.8
|
||||
apt-get install g++-4.8
|
||||
apt-get install gcc-4.8-multilib
|
||||
|
||||
update-alternatives --install /usr/bin/g++ c++ /usr/bin/g++-4.8 100
|
||||
update-alternatives --install /usr/bin/g++ c++ /usr/bin/g++-$gcc_ver 90
|
||||
|
||||
update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-4.8 100
|
||||
update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-$gcc_ver 90
|
||||
|
||||
update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-4.8 100
|
||||
update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-$gcc_ver 90
|
||||
|
||||
update-alternatives --set c++ /usr/bin/g++-4.8
|
||||
update-alternatives --set cc /usr/bin/gcc-4.8
|
||||
update-alternatives --set cpp /usr/bin/cpp-4.8
|
||||
ln -s /etc/alternatives/cc /usr/bin/cc
|
||||
|
||||
echo "The deafult gcc version has now been changed from $gcc_ver to 4.8"
|
||||
else
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "You have successfully installed and configred prerequisites to be able to build an iopsys firmware"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
cd $curdir
|
||||
|
||||
}
|
||||
|
||||
register_command "setup_host" "Install needed packets to host machine"
|
||||
@@ -34,7 +34,7 @@ function ssh_sysupgrade_latest {
|
||||
exit 1
|
||||
fi
|
||||
{ cd `dirname $0`
|
||||
IMAGE=`ls -Art bin/*/*.y2 | tail -n1`
|
||||
IMAGE=`ls -Art bin/*/*.y | tail -n1`
|
||||
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop ssh_sysupgrade $1 $IMAGE $2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
UPDATE=0
|
||||
|
||||
print_git_update()
|
||||
{
|
||||
@@ -100,28 +99,6 @@ insert_hash_in_feed_makefile()
|
||||
(cd ${PKG_DIR}; git add ${name})
|
||||
}
|
||||
|
||||
insert_version_in_feed_makefile()
|
||||
{
|
||||
if [ -n "$PKG_SOURCE_VERSION_FILE" ]
|
||||
then
|
||||
name="$PKG_SOURCE_VERSION_FILE"
|
||||
else
|
||||
name=Makefile
|
||||
fi
|
||||
|
||||
last_version=$(awk -F '=' '/PKG_VERSION:=/ {print $2}' ${PKG_DIR}/${name})
|
||||
|
||||
echo -n "please enter version: "
|
||||
read -ei "$last_version" answer
|
||||
|
||||
if [ -z ${answer} ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i -e "s/\(^PKG_VERSION:=\).*/\1${answer}/" ${PKG_DIR}/${name}
|
||||
(cd ${PKG_DIR}; git add ${name})
|
||||
}
|
||||
|
||||
|
||||
# BUG: fix if only local branche name!
|
||||
branch_uptodate()
|
||||
@@ -423,7 +400,6 @@ check_packages()
|
||||
# print_git_update
|
||||
git_repos_uptodate
|
||||
insert_hash_in_feed_makefile
|
||||
[ "${UPDATE}" ] && insert_version_in_feed_makefile
|
||||
create_message >tmp/msg
|
||||
commit_feed tmp/msg
|
||||
insert_hash_in_feeds_config
|
||||
@@ -571,13 +547,6 @@ feeds_at_top()
|
||||
exit 0
|
||||
}
|
||||
|
||||
usage(){
|
||||
echo -e "$0 [flags]"
|
||||
echo -e "flags:"
|
||||
echo -e " -v\tVerbose mode"
|
||||
echo -e " -h\tShow this help"
|
||||
echo -e " -u\tUpdate package version\n"
|
||||
}
|
||||
|
||||
# Exported interface
|
||||
function update_package {
|
||||
@@ -594,18 +563,15 @@ function update_package {
|
||||
Cyan='\033[0;36m' # Cyan
|
||||
White='\033[0;37m' # White
|
||||
|
||||
while getopts "v:hu" opt; do
|
||||
while getopts "v:h" opt; do
|
||||
case $opt in
|
||||
v)
|
||||
verbose=$OPTARG
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
u)
|
||||
UPDATE=1
|
||||
;;
|
||||
echo "some help! No options yet"
|
||||
exit 1
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
|
||||
@@ -17,7 +17,7 @@ define Package/iup
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=iup client
|
||||
DEPENDS:=+libuci +uci +busybox
|
||||
DEPENDS:=+libuci +uci +busybox
|
||||
endef
|
||||
|
||||
define Package/iup/description
|
||||
|
||||
@@ -31,16 +31,19 @@ management_interfaces() {
|
||||
}
|
||||
|
||||
init_iup() {
|
||||
local polling_enabled
|
||||
local interval
|
||||
local starttime
|
||||
local nummber
|
||||
number=$RANDOM
|
||||
|
||||
[ -f $CRONPATH ] || touch $CRONPATH
|
||||
if [ -f $CRONPATH ]; then
|
||||
echo "File $CRONPATH exists"
|
||||
else
|
||||
echo "File $CRONPATH did not exists"
|
||||
touch $CRONPATH
|
||||
fi
|
||||
|
||||
config_load provisioning
|
||||
config_get polling_enabled polling enabled on
|
||||
config_get interval polling interval
|
||||
config_get starttime polling starttime
|
||||
|
||||
@@ -51,12 +54,12 @@ init_iup() {
|
||||
local newreqopts=
|
||||
local baseopts=
|
||||
local reqopts="$(uci -q get network.$net.reqopts)"
|
||||
local iupopts="66 67 128 224 225 226"
|
||||
local iupopts="66 67 128 224"
|
||||
local ropt iopt
|
||||
config_get enabled iup enabled "on"
|
||||
for ropt in $reqopts; do
|
||||
case $ropt in
|
||||
66|67|128|224|225|226) ;;
|
||||
66|67|128|224) ;;
|
||||
*) baseopts="$baseopts $ropt" ;;
|
||||
esac
|
||||
done
|
||||
@@ -64,7 +67,7 @@ init_iup() {
|
||||
reqopts="$baseopts $iupopts"
|
||||
for ropt in $reqopts; do
|
||||
case $ropt in
|
||||
66|67|128|224|225|226) [ $enabled == "on" ] && newreqopts="$newreqopts $ropt" ;;
|
||||
66|67|128|224) [ $enabled == "on" ] && newreqopts="$newreqopts $ropt" ;;
|
||||
*) newreqopts="$newreqopts $ropt" ;;
|
||||
esac
|
||||
done
|
||||
@@ -79,18 +82,8 @@ init_iup() {
|
||||
ubus call network reload
|
||||
#################################################################
|
||||
|
||||
if [ $polling_enabled == "off" ]; then
|
||||
sed -i "/\/sbin\/iup/d" $CRONPATH
|
||||
logger -s -t /etc/init.d/iup[$$] "Provisioning polling unscheduled" 2>/dev/console
|
||||
return
|
||||
fi
|
||||
|
||||
local log_hour=$starttime
|
||||
local log_minute
|
||||
local log_interval=$interval
|
||||
if [ $interval == "weekly" ]; then
|
||||
interval="0"
|
||||
log_interval="$log_interval/sunday"
|
||||
elif [ $interval == "hourly" ]; then
|
||||
interval='*'
|
||||
starttime='*'
|
||||
@@ -98,7 +91,9 @@ init_iup() {
|
||||
interval='*'
|
||||
fi
|
||||
let "number %= $RANGE"
|
||||
if ! grep -q "$starttime \* \* \\$interval /sbin/iup" "$CRONPATH" ; then
|
||||
if grep -q "$starttime \* \* \\$interval /sbin/iup" "$CRONPATH" ; then
|
||||
echo "IUP is scheduled $starttime \* \* \\$interval "
|
||||
else
|
||||
if grep -q "iup" "$CRONPATH" ; then
|
||||
sed -i "/iup/d" $CRONPATH
|
||||
fi
|
||||
@@ -106,14 +101,19 @@ init_iup() {
|
||||
fsync $CRONPATH
|
||||
/etc/init.d/cron restart
|
||||
fi
|
||||
log_minute=$(awk '/\/sbin\/iup/ {print $1}' /etc/crontabs/root)
|
||||
logger -s -t /etc/init.d/iup[$$] "Provisioning is scheduled at $log_hour:$log_minute $log_interval" 2>/dev/console
|
||||
}
|
||||
|
||||
boot() {
|
||||
init_iup
|
||||
}
|
||||
|
||||
start_service() {
|
||||
init_iup
|
||||
|
||||
/sbin/iup -v &
|
||||
test_default_route
|
||||
if [ "$?" -eq 0 ]; then
|
||||
/sbin/iup -v &
|
||||
fi
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo $$ > /var/run/iup.pid
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/network.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
include /lib/upgrade
|
||||
@@ -16,7 +13,7 @@ export IUPTEMP="/tmp/iup"
|
||||
export INTERACTIVE=0
|
||||
export VERBOSE=0
|
||||
export CONF=1
|
||||
export DESKEY=$(cat /proc/nvram/DesKey | tr -d '\n' | hexdump -e '16/1 "%02x"')
|
||||
export DESKEY=$(cat /proc/nvram/DesKey | hexdump -e '16/1 "%02x"')
|
||||
export MAC=$(cat /proc/nvram/BaseMacAddr)
|
||||
export RANGE=10
|
||||
export RETRYSTOP=5
|
||||
@@ -26,15 +23,28 @@ MAC=${MAC// /}
|
||||
#lower to upper Conversion
|
||||
MAC=$(echo $MAC | tr '[a-z]' '[A-Z]')
|
||||
|
||||
# no verbose: no output
|
||||
# -v log to system log
|
||||
# -v -v log to system log and console
|
||||
# -v -v -v log to system log, console and stderr
|
||||
v() {
|
||||
[ "$VERBOSE" -eq 0 ] && return
|
||||
[ "$VERBOSE" -eq 1 ] && logger -t $0[$$] "$@" && return
|
||||
[ "$VERBOSE" -eq 2 ] && logger -s -t $0[$$] "$@" >/dev/console 2>&1 && return
|
||||
[ "$VERBOSE" -eq 3 ] && logger -s -t $0[$$] "$@" 2>&1 | tee /dev/console && return
|
||||
[ "$VERBOSE" -ge 1 ] && logger -t iup "$@"
|
||||
}
|
||||
|
||||
if [ -f $IUPMD5 ]; then
|
||||
v "File $IUPMD5 exists"
|
||||
else
|
||||
v "File $IUPMD5 did not exists"
|
||||
touch $IUPMD5
|
||||
fi
|
||||
|
||||
handle_ucitrack()
|
||||
{
|
||||
local config="$1"
|
||||
config_get init "$config" init
|
||||
echo $init
|
||||
config_get affects "$config" affects
|
||||
|
||||
for aff in $affects
|
||||
do
|
||||
config_foreach handle_ucitrack $aff
|
||||
done
|
||||
}
|
||||
|
||||
get_packages()
|
||||
@@ -42,19 +52,41 @@ get_packages()
|
||||
local pack
|
||||
pack=$(grep -w 'package' $1)
|
||||
pack=${pack//package/}
|
||||
#pack=${pack//[\'|\"]/}
|
||||
echo $pack | tr -d '\"' | tr -d "'"
|
||||
pack=${pack//[\'|\"]/}
|
||||
echo $pack
|
||||
}
|
||||
|
||||
reload ()
|
||||
{
|
||||
local reload
|
||||
local initlist
|
||||
local reload
|
||||
local pack
|
||||
pack=$(get_packages $1)
|
||||
v "Calling ubus call uci commit for $pack"
|
||||
config_load ucitrack
|
||||
for packname in $pack
|
||||
do
|
||||
ubus call uci commit '{"config":"'$packname'"}'
|
||||
initlist=$(config_foreach handle_ucitrack $packname)
|
||||
for reltest in $initlist
|
||||
do
|
||||
case $reload in
|
||||
*" $reltest "*) v "already added to reload $reltest" ;;
|
||||
*) reload="$reload"" ""$reltest" ;;
|
||||
esac
|
||||
done
|
||||
done
|
||||
v "Init scripts to be run $reload"
|
||||
for inittoreload in $reload
|
||||
do
|
||||
if [ "$inittoreload" != "iup" ]; then
|
||||
/etc/init.d/$inittoreload restart
|
||||
fi
|
||||
done
|
||||
#Ugly hack need to figure out something here
|
||||
test_default_route
|
||||
if [ "$?" -eq 1 ]; then
|
||||
sleep 5
|
||||
fi
|
||||
}
|
||||
|
||||
handle_provisioning() {
|
||||
@@ -82,15 +114,15 @@ handle_provisioning() {
|
||||
config_get deckey "$config" deckey
|
||||
if [ "$enabled" -eq 1 ]; then
|
||||
if [ "$config" == "iup" ]; then
|
||||
v "Using url received in dhcp options"
|
||||
v "using url from dhcp options"
|
||||
config_get url "$config" urliup
|
||||
else
|
||||
else
|
||||
config_get url "$config" url
|
||||
fi
|
||||
url=${url//\$MAC/$MAC}
|
||||
v "Downloading from url \"$url\""
|
||||
|
||||
while [ $retry -le $RETRYSTOP ]
|
||||
v "Download from $url"
|
||||
|
||||
while [ $retry -le $RETRYSTOP ]
|
||||
do
|
||||
if [ ${url%%:*} == "tftp" ]; then
|
||||
tftpfile=${url#*\/\/}
|
||||
@@ -102,10 +134,10 @@ handle_provisioning() {
|
||||
get_image "$url" "cat" > $IUPCONFFILES
|
||||
fi
|
||||
if [ -s $IUPCONFFILES ]; then
|
||||
v "Download finished"
|
||||
v "File Downloaded"
|
||||
retry=$((RETRYSTOP + 1))
|
||||
else
|
||||
v "Download failed, retrying in $incsleep seconds"
|
||||
else
|
||||
v "Download failed will try again in $incsleep sec"
|
||||
sleep $incsleep
|
||||
incsleep=$((incsleep * retry + number))
|
||||
retry=$((retry+1))
|
||||
@@ -125,38 +157,38 @@ handle_Downloaded_file()
|
||||
{
|
||||
local DECKEY
|
||||
local KEY
|
||||
[ -n "$1" ] && DECKEY=$(echo $1 | tr -d '\n' | hexdump -e '16/1 "%02x"')
|
||||
[ -n "$1" ] && DECKEY=$(echo $1 | hexdump -e '16/1 "%02x"')
|
||||
KEY=${DECKEY:-$DESKEY}
|
||||
local img_type
|
||||
case "$(get_image_type "$IUPCONFFILES")" in
|
||||
"INTENO") img_type=2 ;;
|
||||
"CFE+FS") img_type=1 ;;
|
||||
"FS") img_type=0 ;;
|
||||
*) img_type="UNKNOWN";;
|
||||
esac
|
||||
|
||||
case "$(get_image_type "$IUPCONFFILES")" in
|
||||
"INTENO") img_type=2 ;;
|
||||
"CFE+FS") img_type=1 ;;
|
||||
"FS") img_type=0 ;;
|
||||
*) img_type="UNKNOWN";;
|
||||
esac
|
||||
|
||||
if [ "$img_type" == "UNKNOWN" ] ; then
|
||||
case "$(hexdump -v -n 2 -e '1/1 "%02x"' $IUPCONFFILES)" in
|
||||
1f8b)
|
||||
v "Downloaded file is an unencrypted config"
|
||||
v "Found Config"
|
||||
md5=$(md5sum $IUPCONFFILES)
|
||||
md5="${md5%% *}" # remove the first space and everything after it
|
||||
md5sum "$IUPCONFFILES" >> "$IUPMD5.temp"
|
||||
if grep -q "$md5" "$IUPMD5"; then
|
||||
v "Config is already up to date, nothing to do"
|
||||
#because config is up to date we need to disable last step reboot if set
|
||||
v "Config Already Up to Date"
|
||||
#becuse config is up to date we need to disable last step reboot if set
|
||||
reboot="off"
|
||||
rm -rf $IUPTEMP
|
||||
else
|
||||
cd $IUPTEMP
|
||||
cd /tmp/iup/
|
||||
tar xvzf $IUPCONFFILES
|
||||
for f in $CONFILESLURP
|
||||
do
|
||||
v "File to be applied $f and config $(cat $f)"
|
||||
v "file to be applied $f and config $(cat $f)"
|
||||
uci import -f $f
|
||||
done
|
||||
pack=$(get_packages $CONFILESLURP)
|
||||
v "Packages to be commited: $pack"
|
||||
v "$pack packages to be commited"
|
||||
for packname in $pack
|
||||
do
|
||||
uci commit $packname
|
||||
@@ -166,17 +198,14 @@ handle_Downloaded_file()
|
||||
reload $CONFILESLURP
|
||||
fi
|
||||
rm -rf $IUPTEMP
|
||||
|
||||
cp /rom/etc/uci-defaults/* /etc/uci-defaults/
|
||||
sync
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
v "Downloaded file is an encrypted config"
|
||||
v "encrypted"
|
||||
if [ $KEY ]; then
|
||||
openssl enc -d -des-ede -nosalt -K $KEY -iv "0000000000000000" -in $IUPCONFFILES -out $IUPCONFFILES.tmp
|
||||
if [ $? -eq 0 ]; then
|
||||
v "Decryption successful"
|
||||
v "Decrypted Content"
|
||||
mv $IUPCONFFILES.tmp $IUPCONFFILES
|
||||
handle_Downloaded_file
|
||||
else
|
||||
@@ -192,347 +221,78 @@ handle_Downloaded_file()
|
||||
;;
|
||||
esac
|
||||
else
|
||||
v "Downloaded file is a firmware, will start reflashing"
|
||||
v "Image found will start flashing"
|
||||
if [ "$defaultreset" -eq 1 ]; then
|
||||
v "Not saving configuration over reflash"
|
||||
v "nuke config"
|
||||
/sbin/sysupgrade -v -n $IUPCONFFILES
|
||||
else
|
||||
v "Saving configuration over reflash"
|
||||
/sbin/sysupgrade -v $IUPCONFFILES
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# function: change_to_vlan
|
||||
# arg 1 = vlan id
|
||||
# arg 2 = vlan priority
|
||||
# arg 3 = $INTERFACE
|
||||
change_to_vlan() {
|
||||
# local variables.
|
||||
local name="vlan$1" # construct name = vlan + vlanid.
|
||||
local base_dev # varible holding device name of wan port.
|
||||
local wan_if # variable holding wan interfaces.
|
||||
local new_wan_if #
|
||||
###main
|
||||
while [ -n "$1" ]; do
|
||||
case "$1" in
|
||||
|
||||
# extract device name.
|
||||
network_get_device base_dev $3
|
||||
|
||||
# bring down old interface/device.
|
||||
ifdown "${base_dev}"
|
||||
v "option 132: bringing down old if: ${base_dev}"
|
||||
|
||||
# extract base name of device.
|
||||
base_dev=$(echo ${base_dev} | cut -d. -f1)
|
||||
|
||||
# add "VLAN interface" to the "end of the file".
|
||||
uci add layer2_interface_vlan vlan_interface
|
||||
uci set layer2_interface_vlan.@vlan_interface[-1].name=${name}
|
||||
uci set layer2_interface_vlan.@vlan_interface[-1].vlan8021q=${1}
|
||||
uci set layer2_interface_vlan.@vlan_interface[-1].vlan8021p=${2}
|
||||
uci set layer2_interface_vlan.@vlan_interface[-1].ifname="${base_dev}.${1}"
|
||||
uci set layer2_interface_vlan.@vlan_interface[-1].baseifname=${base_dev}
|
||||
# and commit the change.
|
||||
uci commit layer2_interface_vlan
|
||||
v "option 132: committed update to file layer2_interface_vlan"
|
||||
|
||||
# reload configuration files.
|
||||
/etc/init.d/layer2_interface_vlan reload
|
||||
v "option 132: reload layer2_interface_vlan config"
|
||||
|
||||
# replace old interface (like eth0.1 with new eth0.101).
|
||||
wan_if=$(uci get network.$3.ifname)
|
||||
v "option 132: old network.${3}.ifname: $wan_if"
|
||||
|
||||
# loop through the string, remove any word close to "base_dev".
|
||||
for word in ${wan_if}; do
|
||||
#echo $word
|
||||
case $word in
|
||||
${base_dev}*) # don't add if.
|
||||
;;
|
||||
*) new_wan_if=${word}' '${new_wan_if} # add if.
|
||||
#new_wan_if+=" ${word}" # probably not working in ash.
|
||||
-v) export VERBOSE="$(($VERBOSE + 1))";;
|
||||
-q) export VERBOSE="$(($VERBOSE - 1))";;
|
||||
-*)
|
||||
echo "Invalid option: $1"
|
||||
exit 1
|
||||
;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
# append new interface.
|
||||
new_wan_if=${new_wan_if}${base_dev}.${1}
|
||||
uci set network.wan.ifname="${new_wan_if}"
|
||||
# and commit the change.
|
||||
uci commit network
|
||||
v "option 132: committed update to file network: ifname=${new_wan_if}"
|
||||
shift;
|
||||
done
|
||||
|
||||
# reboot into new if configuration.
|
||||
v "Rebooting"
|
||||
export REBOOT_REASON=iup
|
||||
local iupurl
|
||||
local configurl
|
||||
local software
|
||||
local sofwareminuspath
|
||||
config_load provisioning
|
||||
#check if iup should be used or if its overridden by /etc/config
|
||||
config_get configurl configserver url
|
||||
config_get reboot configserver reboot
|
||||
config_get iupurl iup urliup
|
||||
if [ $configurl ]; then
|
||||
handle_provisioning configserver "0"
|
||||
elif [ $iupurl ]; then
|
||||
handle_provisioning iup "1"
|
||||
else
|
||||
v "No Provisioning Server Found"
|
||||
exit
|
||||
fi
|
||||
config_load provisioning
|
||||
config_foreach handle_provisioning subconfig "0"
|
||||
config_get software uppgradeserver url
|
||||
sofwareminuspath=${software##*/}
|
||||
v "Software version to download $sofwareminuspath"
|
||||
|
||||
if [ $software ]; then
|
||||
local sysinfo=$(ubus call router quest "{ \"info\": \"system\" }")
|
||||
json_load "$sysinfo"
|
||||
json_get_var firmware firmware
|
||||
json_get_var filesystem filesystem
|
||||
if [ "$filesystem" == "JFFS2" ] ; then
|
||||
firmware=$firmware.w
|
||||
else
|
||||
firmware=$firmware.y
|
||||
fi
|
||||
if [ "$sofwareminuspath" == "${sofwareminuspath/$firmware/}" ] ; then
|
||||
echo $software
|
||||
handle_provisioning uppgradeserver "0"
|
||||
else
|
||||
v "Will not update software, already up to date"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $CONF -eq 1 ]; then
|
||||
mv "$IUPMD5.temp" $IUPMD5
|
||||
fi
|
||||
|
||||
if [ "$reboot" == "on" ]; then
|
||||
v "Reboot Signaled"
|
||||
/sbin/reboot
|
||||
}
|
||||
|
||||
handle_option224()
|
||||
{
|
||||
if [ -z "$1" ] ; then
|
||||
echo "No argument"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ $(echo $1|grep -o "," | wc -l) -eq 0 ] ; then
|
||||
url=$1
|
||||
else
|
||||
url=$(echo $1|cut -d',' -f1)
|
||||
a=$(echo $1|cut -d',' -f2)
|
||||
b=$(echo $1|cut -d',' -f3)
|
||||
c=$(echo $1|cut -d',' -f4)
|
||||
fi
|
||||
|
||||
currdate=$(date +"%Y-%m-%d")
|
||||
|
||||
active=0
|
||||
if [ -z $a ] ; then
|
||||
active=1
|
||||
elif [ $a ] && [ $b ] && [ $a -lt 25 ] ; then
|
||||
#Time
|
||||
begin=$(date +%s -d"$currdate $a")
|
||||
now=$(date +%s)
|
||||
end=$((begin+3600*$b))
|
||||
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
|
||||
active=1
|
||||
fi
|
||||
elif [ $a ] && [ $b ] && [ $c ] && [ $a -gt 25 ] ; then
|
||||
#Date
|
||||
y=$(echo $a| cut -c1-4)
|
||||
m=$(echo $a| cut -c5-6)
|
||||
d=$(echo $a| cut -c7-8)
|
||||
begin=$(date +%s -d"$y-$m-$d $b")
|
||||
now=$(date +%s)
|
||||
end=$((begin+3600*$c))
|
||||
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
|
||||
active=1
|
||||
fi
|
||||
else
|
||||
echo "Bad format"
|
||||
return 1
|
||||
fi
|
||||
|
||||
softwareminuspath=${url##*/}
|
||||
|
||||
if [ $url ] && [ $active -eq 1 ]; then
|
||||
v "Software version to download \"$softwareminuspath\""
|
||||
local sysinfo=$(ubus call router.system info)
|
||||
json_load "$sysinfo"
|
||||
json_select system
|
||||
json_get_var firmware firmware
|
||||
local firmware_new=${softwareminuspath%.*} # remove extension (.w, .y or .y2) from filename
|
||||
if [ "$firmware_new" != "$firmware" ] ; then
|
||||
v "Firmware found $url will start flashing"
|
||||
v "Currently running firmware: \"$firmware\""
|
||||
v "Newly received firmware: \"$firmware_new\""
|
||||
wait_for_dns $url
|
||||
v "Start flashing"
|
||||
/sbin/sysupgrade -v $url &
|
||||
return 1
|
||||
else
|
||||
v "Firmware is up to date, nothing to do"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
parse_dhcp_options()
|
||||
{
|
||||
local the_json="$@"
|
||||
# Process IUP related DHCP options #
|
||||
local privopt224 privopt225 privopt226 vendorspecinf httpurl128
|
||||
local tftp bootfile vlanid vlanpriority interface
|
||||
|
||||
json_load "$the_json"
|
||||
json_get_var interface interface
|
||||
json_get_var privopt224 privopt224
|
||||
json_get_var privopt225 privopt225
|
||||
json_get_var privopt226 privopt226
|
||||
json_get_var vendorspecinf vendorspecinf # option 43
|
||||
json_get_var httpurl128 httpurl128
|
||||
json_get_var tftp tftp # option 66
|
||||
json_get_var bootfile bootfile #option 67
|
||||
json_get_var vlanid vlanid # option 132
|
||||
json_get_var vlanpriority vlanpriority # option 133
|
||||
|
||||
v "Processing dhcp options"
|
||||
|
||||
if [ $privopt224 ]; then
|
||||
v "dhcp option 224 firmware url $privopt224"
|
||||
handle_option224 $privopt224
|
||||
[ $? -eq 1 ] && exit
|
||||
fi
|
||||
|
||||
if [ $vendorspecinf ]; then
|
||||
v "dhcp option 43 tr69 url $vendorspecinf"
|
||||
url=${vendorspecinf%%,*}; rest=${vendorspecinf#*,}
|
||||
provisioningcode=${rest%%,*};
|
||||
uci_set_state provisioning iup urlcwmp "$url"
|
||||
uci_set_state provisioning iup url "$url"
|
||||
uci_set_state provisioning iup provisioningcode "$provisioningcode"
|
||||
elif [ $httpurl128 ]; then
|
||||
v "dhcp option 128 http config url $httpurl128"
|
||||
uci_set_state provisioning iup urliup "$httpurl128"
|
||||
elif [ $tftp ]; then
|
||||
v "dhcp option 66 tftp config url $tftp"
|
||||
if [ ${bootfile:0:1} == '/' ]; then
|
||||
uci_set_state provisioning iup urliup "tftp://$tftp$bootfile"
|
||||
else
|
||||
uci_set_state provisioning iup urliup "tftp://$tftp/$bootfile"
|
||||
fi
|
||||
fi
|
||||
|
||||
# vlanid (and vlanpriority)
|
||||
if [ -n "$vlanid" -a -n "$vlanpriority" ]; then
|
||||
v "dhcp option 132 vlanid: ${vlanid} vlanpriority: ${vlanpriority}"
|
||||
change_to_vlan ${vlanid} ${vlanpriority} ${interface}
|
||||
elif [ -n "$vlanid" ]; then
|
||||
v "dhcp option 132 vlanid: ${vlanid}"
|
||||
change_to_vlan ${vlanid} 0 ${interface}
|
||||
elif [ -n "$privopt225" ] || [ -n "$privopt226" ]; then
|
||||
# opt225 and opt226 can be used together or separatly
|
||||
if [ -n "$privopt225" ]; then
|
||||
v "dhcp option 225: $privopt225"
|
||||
# option225 is allowd to change only once per CPE
|
||||
if [ "$(uci get -q ice.cloud.frozen)" != "1" ] ; then
|
||||
uci set ice.cloud.frozen="1"
|
||||
uci set ice.cloud.enabled="1"
|
||||
uci set ice.cloud.server="$privopt225"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$privopt226" ]; then
|
||||
v "dhcp option 226: $privopt226"
|
||||
[ -z "$(uci get -q ice.dhcp)" ] && uci set ice.dhcp="dhcp"
|
||||
uci set ice.dhcp.opt226connectionid="$privopt226"
|
||||
ubus send dhcp.opt226connectionid '{"opt226connectionid":"","value":"'$privopt226'"}'
|
||||
fi
|
||||
uci commit
|
||||
fi
|
||||
}
|
||||
|
||||
# wait_for_default_gateway to become reachable
|
||||
# return 0 if the default gateway is reachable
|
||||
# return 1 if the default gateway is not reachable after $wait_time
|
||||
wait_for_default_gateway()
|
||||
{
|
||||
local gateway
|
||||
local device
|
||||
local wait_time=120
|
||||
local wait_interval=10
|
||||
|
||||
while [ true ] ; do
|
||||
|
||||
gateway=""
|
||||
device=""
|
||||
network_flush_cache
|
||||
network_get_gateway gateway wan #true
|
||||
network_get_device device wan
|
||||
device="${device:+-I }$device"
|
||||
if ping -q -w 1 -c 1 $device $gateway >/dev/null 2>&1 ; then
|
||||
[ "$wait_time" -lt "60" ] && v "Default gateway $gateway is reachable"
|
||||
sleep $wait_interval
|
||||
return 0
|
||||
fi
|
||||
|
||||
v "Waiting for default gateway. Countdown $wait_time seconds"
|
||||
sleep $wait_interval
|
||||
wait_time=$((wait_time - wait_interval))
|
||||
[ "$wait_time" -le "0" ] && break # timer expired
|
||||
done
|
||||
|
||||
return 1 # default gateway not reachable
|
||||
}
|
||||
|
||||
|
||||
main()
|
||||
{
|
||||
|
||||
while [ -n "$1" ]; do
|
||||
case "$1" in
|
||||
-v) export VERBOSE="$(($VERBOSE + 1))";;
|
||||
-q) export VERBOSE="$(($VERBOSE - 1))";;
|
||||
--dhcp-options)
|
||||
shift
|
||||
parse_dhcp_options "$@"
|
||||
exit 0
|
||||
;;
|
||||
-*)
|
||||
echo "Invalid option: $1"
|
||||
exit 1
|
||||
;;
|
||||
*) break;;
|
||||
esac
|
||||
shift;
|
||||
done
|
||||
|
||||
if ! wait_for_default_gateway ; then
|
||||
v "Default gateway is not reachable. Aborting iup."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f $IUPMD5 ]; then
|
||||
v "Creating file $IUPMD5"
|
||||
touch $IUPMD5
|
||||
fi
|
||||
|
||||
|
||||
local iupurl
|
||||
local configurl
|
||||
local software
|
||||
local sofwareminuspath
|
||||
|
||||
config_load provisioning
|
||||
#check if iup should be used or if its overridden by /etc/config
|
||||
config_get configurl configserver url
|
||||
config_get reboot configserver reboot
|
||||
config_get iupurl iup urliup
|
||||
|
||||
if [ $configurl ]; then
|
||||
handle_provisioning configserver "0"
|
||||
elif [ $iupurl ]; then
|
||||
handle_provisioning iup "1"
|
||||
else
|
||||
v "No provisioning server configured"
|
||||
exit
|
||||
fi
|
||||
|
||||
config_load provisioning
|
||||
config_foreach handle_provisioning subconfig "0"
|
||||
config_get software uppgradeserver url
|
||||
sofwareminuspath=${software##*/}
|
||||
|
||||
if [ $software ]; then
|
||||
v "Software version to download \"$sofwareminuspath\""
|
||||
local sysinfo=$(ubus call router.system info)
|
||||
json_load "$sysinfo"
|
||||
json_select system
|
||||
json_get_var firmware firmware
|
||||
json_get_var filesystem filesystem
|
||||
if [ "$filesystem" == "JFFS2" ] ; then
|
||||
firmware=$firmware.w
|
||||
else
|
||||
firmware=$firmware.y
|
||||
fi
|
||||
if [ "$sofwareminuspath" == "${sofwareminuspath/$firmware/}" ] ; then
|
||||
v "Software \"$software\""
|
||||
handle_provisioning uppgradeserver "0"
|
||||
else
|
||||
v "Will not update software, already up to date"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $CONF -eq 1 ]; then
|
||||
mv "$IUPMD5.temp" $IUPMD5
|
||||
fi
|
||||
|
||||
if [ "$reboot" == "on" ]; then
|
||||
v "Rebooting"
|
||||
export REBOOT_REASON=iup
|
||||
/sbin/reboot
|
||||
fi
|
||||
|
||||
rm -rf /var/run/iup.pid
|
||||
}
|
||||
|
||||
main $@
|
||||
fi
|
||||
rm -rf /var/run/iup.pid
|
||||
|
||||
72
iup/files/sbin/iup224
Executable file
72
iup/files/sbin/iup224
Executable file
@@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/network/config.sh
|
||||
|
||||
if [ -z $1 ] ; then
|
||||
echo "No argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $(echo $1|grep -o "," | wc -l) -eq 0 ] ; then
|
||||
url=$1
|
||||
else
|
||||
url=$(echo $1|cut -d',' -f1)
|
||||
a=$(echo $1|cut -d',' -f2)
|
||||
b=$(echo $1|cut -d',' -f3)
|
||||
c=$(echo $1|cut -d',' -f4)
|
||||
fi
|
||||
|
||||
echo "url" $url
|
||||
echo "a" $a
|
||||
echo "b" $b
|
||||
echo "c" $c
|
||||
|
||||
currdate=$(date +"%Y-%m-%d")
|
||||
|
||||
active=0
|
||||
if [ -z $a ] ; then
|
||||
active=1
|
||||
elif [ $a ] && [ $b ] && [ $a -lt 25 ] ; then
|
||||
#Time
|
||||
begin=$(date +%s -d"$currdate $a")
|
||||
now=$(date +%s)
|
||||
end=$((begin+3600*$b))
|
||||
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
|
||||
active=1
|
||||
fi
|
||||
elif [ $a ] && [ $b ] && [ $c ] && [ $a -gt 25 ] ; then
|
||||
#Date
|
||||
y=$(echo $a| cut -c1-4)
|
||||
m=$(echo $a| cut -c5-6)
|
||||
d=$(echo $a| cut -c7-8)
|
||||
begin=$(date +%s -d"$y-$m-$d $b")
|
||||
now=$(date +%s)
|
||||
end=$((begin+3600*$c))
|
||||
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
|
||||
active=1
|
||||
fi
|
||||
else
|
||||
echo "Bad format"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
softwareminuspath=${url##*/}
|
||||
|
||||
if [ $url ] && [ $active -eq 1 ]; then
|
||||
echo "Software version to download $softwareminuspath"
|
||||
local sysinfo=$(ubus call router quest "{ \"info\": \"system\" }")
|
||||
json_load "$sysinfo"
|
||||
json_get_var firmware firmware
|
||||
local firmware_new=${softwareminuspath%.*} # remove extension (.w, .y or .y2) from filename
|
||||
if [ "$firmware_new" != "$firmware" ] ; then
|
||||
echo "Image found $url will start flashing"
|
||||
wait_for_dns $url
|
||||
/sbin/sysupgrade -v $url &
|
||||
exit 1
|
||||
else
|
||||
echo "Will not update software, already up to date"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
. /usr/share/libubox/jshn.sh
|
||||
include /lib/network
|
||||
|
||||
START=22
|
||||
START=21
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
local AnnexM
|
||||
local GDmt
|
||||
local Glite
|
||||
local T1413
|
||||
local Glite
|
||||
local T1413
|
||||
local ADSL2
|
||||
local AnnexL
|
||||
local ADSL2plus
|
||||
local VDSL2
|
||||
local a8a
|
||||
local b8b
|
||||
local VDSL2
|
||||
local a8a
|
||||
local b8b
|
||||
local c8c
|
||||
local d8d
|
||||
local a12a
|
||||
@@ -75,21 +75,20 @@ start_service() {
|
||||
sra=$(echo $sra | sed 's/0/off/g')
|
||||
|
||||
echo "Starting DSL"
|
||||
|
||||
|
||||
xtmctl start
|
||||
xtmctl operate intf --state 1 enable
|
||||
json_load "$(ubus call router.system info)"
|
||||
json_select specs
|
||||
json_load "$(ubus call router quest "{ \"info\": \"specs\" }")"
|
||||
json_get_var vdsl vdsl
|
||||
|
||||
if [ $vdsl -eq 1 ]; then
|
||||
echo "xdslctl start --up --mod $GDmt$Glite$T1413$ADSL2$AnnexL$ADSL2plus$AnnexM$VDSL2 --profile \"$a8a $b8b $c8c $d8d $a12a $b12b $a17a\" --sra $sra --bitswap $bitswap --us0 $US0"
|
||||
echo "xdslctl start --up --mod $GDmt$Glite$T1413$ADSL2$AnnexL$ADSL2plus$AnnexM$VDSL2 --profile \"$a8a $b8b $c8c $d8d $a12a $b12b $a17a\" --sra $sra --bitswap $bitswap --us0 $US0"
|
||||
xdslctl start --up --mod $GDmt$Glite$T1413$ADSL2$AnnexL$ADSL2plus$AnnexM$VDSL2 --profile "$a8a $b8b $c8c $d8d $a12a $b12b $a17a" --sra $sra --bitswap $bitswap --us0 $US0
|
||||
else
|
||||
echo "xdslctl start --up --mod $GDmt$Glite$T1413$ADSL2$AnnexL$ADSL2plus$AnnexM --sra $sra --bitswap $bitswap"
|
||||
xdslctl start --up --mod $GDmt$Glite$T1413$ADSL2$AnnexL$ADSL2plus$AnnexM --sra $sra --bitswap $bitswap
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
. /lib/functions.sh
|
||||
include /lib/network
|
||||
|
||||
START=22
|
||||
START=21
|
||||
USE_PROCD=1
|
||||
|
||||
checkpvc() {
|
||||
local retur
|
||||
local vpi=$1
|
||||
local vci=$2
|
||||
|
||||
|
||||
retur=$(xtmctl operate conn --show | awk -v test="$vpi/$vci" '{if ($3 ==test ) print $5 }')
|
||||
|
||||
case $retur in
|
||||
@@ -25,31 +25,31 @@ checkxtmlist() {
|
||||
local scr
|
||||
local mbs
|
||||
local retur
|
||||
|
||||
|
||||
case $# in
|
||||
1)
|
||||
pcr=0
|
||||
scr=0
|
||||
mbs=0
|
||||
;;
|
||||
2)
|
||||
;;
|
||||
2)
|
||||
pcr=$2
|
||||
scr=0
|
||||
mbs=0
|
||||
mbs=0
|
||||
;;
|
||||
4)
|
||||
4)
|
||||
pcr=$2
|
||||
scr=$3
|
||||
mbs=$4
|
||||
mbs=$4
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
retur=$(xtmctl operate tdte --show | awk -v test="$dtype" -v pcr="$pcr" -v scr="$scr" -v mbs="$mbs" '{if ($2 ==test && $3==pcr && $4==scr && $5==mbs ) print $1 }')
|
||||
|
||||
case $retur in
|
||||
''|*[!0-9]*) return 0 ;;
|
||||
*) return $retur ;;
|
||||
esac
|
||||
esac
|
||||
}
|
||||
|
||||
atm_inf_conf() {
|
||||
@@ -71,15 +71,13 @@ atm_inf_conf() {
|
||||
config_get mbs $1 mbs
|
||||
config_get vpi $1 vpi
|
||||
config_get vci $1 vci
|
||||
config_get ifname $1 ifname
|
||||
config_get ifname $1 ifname
|
||||
config_get baseifname $1 baseifname
|
||||
config_get name $1 name
|
||||
config_get bridge $1 bridge
|
||||
checkpvc $vpi $vci
|
||||
ret=$?
|
||||
|
||||
ifname="${ifname:-$baseifname.1}"
|
||||
|
||||
if [ "$ret" -eq 0 ]; then
|
||||
checkxtmlist $atmtype $pcr $scr $mbs
|
||||
ret=$?
|
||||
@@ -92,7 +90,7 @@ atm_inf_conf() {
|
||||
rtvbr)xtmctl operate tdte --add "$atmtype" $pcr $scr $mbs;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
case $link_type in
|
||||
EoA)config_get encaps $1 encapseoa;;
|
||||
PPPoA)config_get encaps $1 encapspppoa;;
|
||||
@@ -107,7 +105,7 @@ atm_inf_conf() {
|
||||
xtmctl operate conn --addq 1.$vpi.$vci 7 wrr 1 # high priority queue, internal traffic dhcp igmp dns and icmp
|
||||
xtmctl operate conn --createnetdev 1.$vpi.$vci ${ifname%%.*}
|
||||
xtmctl operate intf --state 1 enable
|
||||
|
||||
|
||||
brcm_virtual_interface_rules "$baseifname" "$ifname" "$bridge"
|
||||
fi
|
||||
}
|
||||
@@ -118,7 +116,7 @@ remove_netdevices() {
|
||||
local rest
|
||||
local x=0
|
||||
#local baseifname
|
||||
local vpivci=`xtmctl operate conn --show | grep "ATM\|mode" | awk '{if (NR!=1 && $1!="PTM") {print $3}}'`
|
||||
local vpivci=`xtmctl operate conn --show | awk '{if (NR!=1 && $1!="PTM") {print $3}}'`
|
||||
|
||||
for i in $vpivci
|
||||
do
|
||||
@@ -148,7 +146,7 @@ stop_service() {
|
||||
echo "Stopping ADSL"
|
||||
#xtmctl stop causes IRQ issues"
|
||||
# xtmctl stop
|
||||
remove_netdevices
|
||||
remove_netdevices
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
@@ -157,7 +155,7 @@ reload_service() {
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger layer2_interface_adsl
|
||||
procd_add_reload_trigger layer2_interface_adsl
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,27 +3,23 @@
|
||||
. /lib/functions.sh
|
||||
include /lib/network
|
||||
|
||||
START=22
|
||||
START=21
|
||||
USE_PROCD=1
|
||||
|
||||
get_current_status() {
|
||||
local port="$1"
|
||||
local media="$(ethctl $port media-type 2>&1)"
|
||||
if echo $media | grep "1000" >/dev/null; then
|
||||
return 0
|
||||
elif echo $media | grep "100" >/dev/null; then
|
||||
return 1
|
||||
elif echo $media | grep "10" >/dev/null; then
|
||||
return 1
|
||||
fi
|
||||
local port="$1"
|
||||
local media="$(ethctl $port media-type 2>&1)"
|
||||
if echo $media | grep "1000" >/dev/null; then
|
||||
return 0
|
||||
elif echo $media | grep "100" >/dev/null; then
|
||||
return 1
|
||||
elif echo $media | grep "10" >/dev/null; then
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
removeethernet() {
|
||||
config_get baseifname $1 baseifname
|
||||
config_get ifname $1 ifname
|
||||
|
||||
ifname="${ifname:-$baseifname.1}"
|
||||
|
||||
vlanctl --if-delete $ifname
|
||||
config_load layer2_interface_vlan
|
||||
#kill all vlans related to this interface
|
||||
@@ -37,9 +33,6 @@ removevlan() {
|
||||
|
||||
config_get baseifname $1 baseifname
|
||||
config_get ifname $1 ifname
|
||||
|
||||
ifname="${ifname:-$baseifname.1}"
|
||||
|
||||
if [ "$wan" == "$baseifname" ]; then
|
||||
echo "vlanctl --if-delete $ifname"
|
||||
vlanctl --if-delete $ifname
|
||||
@@ -50,36 +43,32 @@ addethernet() {
|
||||
config_get baseifname $1 baseifname
|
||||
config_get ifname $1 ifname
|
||||
config_get bridge $1 bridge
|
||||
|
||||
ifname="${ifname:-$baseifname.1}"
|
||||
|
||||
brcm_virtual_interface_rules "$baseifname" "$ifname" "$bridge"
|
||||
|
||||
|
||||
}
|
||||
|
||||
boot() {
|
||||
local baseifname wanport portnum
|
||||
config_load layer2_interface_ethernet
|
||||
config_get baseifname Wan baseifname
|
||||
|
||||
if [ "$(db get hw.board.hardware)" != "EG300" ]; then
|
||||
get_current_status $baseifname
|
||||
local ret=$?
|
||||
if [ $ret -eq 1 ]; then
|
||||
ethctl $baseifname phy-power down
|
||||
ethctl $baseifname phy-power up
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$(db get hw.board.hardware)" != "EG300" ]; then
|
||||
get_current_status $baseifname
|
||||
local ret=$?
|
||||
if [ $ret -eq 1 ]; then
|
||||
ethctl $baseifname phy-power down
|
||||
ethctl $baseifname phy-power up
|
||||
fi
|
||||
fi
|
||||
for interf in `db get hw.board.ethernetPortOrder`; do ethswctl -c wan -i $interf -o disable ; done
|
||||
wanport=$(db get hw.board.ethernetWanPort)
|
||||
unit=$(echo $(get_port_number $wanport) | cut -d ' ' -f 1)
|
||||
port=$(echo $(get_port_number $wanport) | cut -d ' ' -f 2)
|
||||
ethswctl -c pause -n $unit -p $port -v 1
|
||||
portnum=$(get_port_number $wanport)
|
||||
ethswctl -c pause -p $portnum -v 1
|
||||
ethswctl -c hw-switching -o enable
|
||||
if [ $baseifname ]; then
|
||||
ethswctl -c wan -i $baseifname -o enable
|
||||
fi
|
||||
|
||||
|
||||
if [ "`db get hw.board.tm`" == "1" ]; then
|
||||
for interf in `db get hw.board.ethernetPortOrder`; do
|
||||
tmctl porttminit --devtype ETH --if $interf --flag 1 || \
|
||||
@@ -109,7 +98,7 @@ reload_service() {
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger layer2_interface_ethernet
|
||||
procd_add_reload_trigger layer2_interface_ethernet
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
. /lib/functions.sh
|
||||
include /lib/network
|
||||
|
||||
START=22
|
||||
START=21
|
||||
USE_PROCD=1
|
||||
|
||||
checkptm() {
|
||||
@@ -18,7 +18,7 @@ checkptm() {
|
||||
fi
|
||||
|
||||
retur=$(xtmctl operate conn --show | awk -v dslat="$dslat" -v ptmprio="$ptmprio" '{if ($2 == dslat && $3 == ptmprio ) print $2 }')
|
||||
|
||||
|
||||
case $retur in
|
||||
''|*[!0-9]*) return 0 ;;
|
||||
*) return $retur ;;
|
||||
@@ -38,16 +38,13 @@ ptm_inf_conf() {
|
||||
config_get baseifname $1 baseifname
|
||||
config_get bridge $1 bridge
|
||||
|
||||
ifname="${ifname:-$baseifname.1}"
|
||||
|
||||
checkptm $ptmprio $dslat
|
||||
ret=$?
|
||||
|
||||
if [ "$ret" -eq 0 ]; then
|
||||
xtmctl operate conn --add $dslat.$ptmprio 0 1
|
||||
xtmctl operate conn --addq $dslat.$ptmprio 0 wrr 1 -1 -1 3000 # low priority queue
|
||||
xtmctl operate conn --addq $dslat.$ptmprio 1 wrr 1 -1 -1 3000 # mid priority queue upstream ACK's and ping from LAN will use this queue
|
||||
xtmctl operate conn --addq $dslat.$ptmprio 7 wrr 1 -1 -1 3000 # high priority queue, internal traffic dhcp igmp dns and icmp
|
||||
xtmctl operate conn --addq $dslat.$ptmprio 0 wrr 1 -1 -1 3000
|
||||
xtmctl operate conn --addq $dslat.$ptmprio 7 wrr 1 -1 -1 3000 # fixes pppoe disconnect issue
|
||||
xtmctl operate conn --createnetdev $dslat.$ptmprio ${ifname%%.*}
|
||||
xtmctl operate intf --state 1 enable
|
||||
xtmctl start
|
||||
@@ -60,7 +57,7 @@ remove_netdevices() {
|
||||
local x=0
|
||||
|
||||
IFS=$'\n'
|
||||
for i in `xtmctl operate conn --show | grep "PTM\|mode"`
|
||||
for i in `xtmctl operate conn --show`
|
||||
do
|
||||
if [ $x -eq 1 ]; then
|
||||
delptm=$(echo $i | awk '{if ($1!="ATM") print $2"."$10}')
|
||||
@@ -99,7 +96,7 @@ reload_service() {
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger layer2_interface_vdsl
|
||||
procd_add_reload_trigger layer2_interface_vdsl
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
. /lib/functions.sh
|
||||
include /lib/network
|
||||
|
||||
START=22
|
||||
START=21
|
||||
USE_PROCD=1
|
||||
|
||||
vlan_inf_conf() {
|
||||
@@ -16,9 +16,6 @@ vlan_inf_conf() {
|
||||
config_get vlan8021p $1 vlan8021p
|
||||
config_get vlan8021q $1 vlan8021q
|
||||
config_get bridge $1 bridge
|
||||
|
||||
ifname="${ifname:-$baseifname.$vlan8021q}"
|
||||
|
||||
addbrcmvlan "$baseifname" "$vlan8021p" "$vlan8021q" "$bridge" "$ifname"
|
||||
}
|
||||
|
||||
@@ -45,6 +42,6 @@ reload_service() {
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger layer2_interface_vlan
|
||||
procd_add_reload_trigger layer2_interface_vlan
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,6 @@ wlmngr_doWlConf() {
|
||||
|
||||
#wlctl -i wl$idx nreqd $nreqd
|
||||
wlconf wl$idx up
|
||||
wlctl -i wl$idx obss_coex 1
|
||||
}
|
||||
|
||||
wlmngr_setupMbssMacAddr() {
|
||||
@@ -99,6 +98,22 @@ wlmngr_setupMbssMacAddr() {
|
||||
done
|
||||
}
|
||||
|
||||
#enableBSD() {
|
||||
# nvram_set bsd_role=0
|
||||
# [ act_wl_cnt == 0 ] && return FALSE
|
||||
# for i in wl0 wl1; do
|
||||
# if [ m_instance_wl[i].m_wlVar.wlEnbl == TRUE && m_instance_wl[i].m_wlVar.bsdRole > 0 ]; then
|
||||
# nvram set bsd_role=m_instance_wl[i].m_wlVar.bsdRole
|
||||
# nvram set bsd_pport=m_instance_wl[i].m_wlVar.bsdPport
|
||||
# nvram set bsd_hpport=m_instance_wl[i].m_wlVar.bsdHport
|
||||
# nvram set bsd_helper=m_instance_wl[i].m_wlVar.bsdHelper
|
||||
# nvram set bsd_primary=m_instance_wl[i].m_wlVar.bsdPrimary
|
||||
# return TRUE
|
||||
# fi
|
||||
# done
|
||||
# return FALSE
|
||||
#}
|
||||
|
||||
#enableSSD() {
|
||||
# nvram set ssd_enable=0
|
||||
# [ act_wl_cnt == 0 ] && return FALSE
|
||||
@@ -154,89 +169,6 @@ wlmngr_startServices() {
|
||||
# }
|
||||
}
|
||||
|
||||
enableBSD() {
|
||||
local wdev wdev_to_steer
|
||||
local enabled policy
|
||||
local rssi_threshold bw_util
|
||||
|
||||
nvram set bsd_role=0
|
||||
nvram unset bsd_ifnames
|
||||
|
||||
enabled="$(uci -q get wireless.bandsteering.enabled)"
|
||||
|
||||
[ "$enabled" == "1" ] || return 1
|
||||
|
||||
policy="$(uci -q get wireless.bandsteering.policy)"
|
||||
policy=${policy:-0}
|
||||
rssi_threshold="$(uci -q get wireless.bandsteering.rssi_threshold)"
|
||||
rssi_threshold=${rssi_threshold:--75}
|
||||
bw_util="$(uci -q get wireless.bandsteering.bw_util)"
|
||||
bw_util=${bw_util:--60}
|
||||
|
||||
nvram set bsd_role=3
|
||||
nvram set bsd_pport=9878
|
||||
nvram set bsd_hpport=9877
|
||||
nvram set bsd_helper=192.168.1.2
|
||||
nvram set bsd_primary=192.168.1.1
|
||||
nvram set bsd_scheme=2
|
||||
nvram set bsd_poll_interval=1
|
||||
nvram set bsd_bounce_detect="180 8 3600"
|
||||
nvram set bsd_msglevel=0
|
||||
nvram set bsd_status_poll=5
|
||||
nvram set bsd_status=3
|
||||
|
||||
for wdev in wl0 wl1; do
|
||||
#if [ "$(uci -q get wireless.$wdev.band_steering)" == "1" ]; then
|
||||
nvram set bsd_ifnames="$(nvram get bsd_ifnames) $wdev"
|
||||
[ "$wdev" == "wl0" ] && wdev_to_steer="wl1" || wdev_to_steer="wl0"
|
||||
|
||||
if [ "$policy" == "0" ]; then
|
||||
# RSSI Threshold based policy #
|
||||
if [ "$(nvram get ${wdev}_nband)" == "2" ]; then
|
||||
# 2.4G
|
||||
nvram set ${wdev}_bsd_if_quality_policy="0 0x0 -100"
|
||||
nvram set ${wdev}_bsd_if_select_policy=$wdev_to_steer
|
||||
nvram set ${wdev}_bsd_sta_select_policy="0 0 0 0 0 1 0 0 0 0x600"
|
||||
nvram set ${wdev}_bsd_steer_prefix=$wdev
|
||||
nvram set ${wdev}_bsd_steering_policy="0 5 3 0 0 0x10"
|
||||
else
|
||||
# 5G
|
||||
nvram set ${wdev}_bsd_if_quality_policy="40 0x0 $rssi_threshold"
|
||||
nvram set ${wdev}_bsd_if_select_policy=$wdev_to_steer
|
||||
nvram set ${wdev}_bsd_sta_select_policy="0 0 0 0 0 1 0 0 0 0x240"
|
||||
nvram set ${wdev}_bsd_steer_prefix=$wdev
|
||||
nvram set ${wdev}_bsd_steering_policy="80 5 3 $rssi_threshold 0 0x40"
|
||||
fi
|
||||
else
|
||||
# Bandwidth Usage based policy #
|
||||
if [ "$(nvram get ${wdev}_nband)" == "2" ]; then
|
||||
# 2.4G
|
||||
nvram set ${wdev}_bsd_if_quality_policy="0 0x0 -75"
|
||||
nvram set ${wdev}_bsd_if_select_policy=$wdev_to_steer
|
||||
nvram set ${wdev}_bsd_sta_select_policy="0 0 0 0 0 1 0 0 0 0x600"
|
||||
nvram set ${wdev}_bsd_steer_prefix=$wdev
|
||||
nvram set ${wdev}_bsd_steering_policy="0 5 3 0 0 0x10"
|
||||
else
|
||||
# 5G
|
||||
nvram set ${wdev}_bsd_if_quality_policy="40 0x0 -75"
|
||||
nvram set ${wdev}_bsd_if_select_policy=$wdev_to_steer
|
||||
nvram set ${wdev}_bsd_sta_select_policy="0 0 0 0 0 1 0 0 0 0x240"
|
||||
nvram set ${wdev}_bsd_steer_prefix=$wdev
|
||||
nvram set ${wdev}_bsd_steering_policy="$bw_util 5 3 0 0 0x40"
|
||||
fi
|
||||
fi
|
||||
#fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
wlmngr_BSDCtrl() {
|
||||
killall -q -15 bsd 2>/dev/null
|
||||
if $(enableBSD); then
|
||||
bsd&
|
||||
fi
|
||||
}
|
||||
|
||||
wlmngr_startWsc()
|
||||
{
|
||||
local idx=$1
|
||||
@@ -251,7 +183,7 @@ wlmngr_startWsc()
|
||||
nvram set wl_wps_reg="enabled"
|
||||
nvram set lan_wps_reg=enabled #"enabled/disabled"
|
||||
nvram set wps_uuid=0x000102030405060708090a0b0c0d0ebb
|
||||
nvram set wps_device_name=Inteno
|
||||
nvram set wps_device_name=BroadcomAP
|
||||
nvram set wps_mfstring=Broadcom
|
||||
nvram set wps_modelname=Broadcom
|
||||
nvram set wps_modelnum=123456
|
||||
@@ -308,20 +240,6 @@ wlmngr_wlIfcUp() {
|
||||
ifconfig $vif down
|
||||
fi
|
||||
done
|
||||
|
||||
case "$(uci -q get wireless.wl$idx.monitor)" in
|
||||
1)
|
||||
wlctl -i wl$idx monitor 1
|
||||
ifconfig prism$idx up
|
||||
;;
|
||||
2)
|
||||
wlctl -i wl$idx monitor 2
|
||||
ifconfig radiotap$idx up
|
||||
;;
|
||||
*)
|
||||
wlctl -i wl$idx monitor 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
wlmngr_doWds() {
|
||||
@@ -354,7 +272,6 @@ wlmngr_finalize() {
|
||||
# local isac="$(db get hw.$pcid.is_ac)"
|
||||
# if [ "$isac" == "1" ]; then
|
||||
# wlctl -i $device msglevel +radar +dfs
|
||||
# #dhdctl -i $device dconpoll 200
|
||||
# fi
|
||||
local rdrthrs="$(db get hw.$pcid.radarthrs)"
|
||||
if [ -n "$rdrthrs" ]; then
|
||||
|
||||
@@ -9,7 +9,7 @@ removeall_vlandevices()
|
||||
local i
|
||||
|
||||
for i in `ls /proc/sys/net/ipv4/conf`; do
|
||||
case "$i" in
|
||||
case "$i" in
|
||||
[eap][t][mh][0-9].v1)
|
||||
;;
|
||||
[eap][t][mh][0-9].1)
|
||||
@@ -33,13 +33,13 @@ ifvlanexits()
|
||||
|
||||
for i in `ls /proc/sys/net/ipv4/conf`; do
|
||||
if [ "$i" == "$vif" ]; then
|
||||
return 1
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
ifbaseexists()
|
||||
ifbaseexists ()
|
||||
{
|
||||
local if=$1
|
||||
|
||||
@@ -58,29 +58,17 @@ ifbaseexists()
|
||||
return 0
|
||||
}
|
||||
|
||||
check_mac_address()
|
||||
{
|
||||
local baseifname="$1"
|
||||
local vlan="$2"
|
||||
local basemac
|
||||
local mac=$(ifconfig -a | grep "^${baseifname}.${vlan} " | awk '{print $NF}')
|
||||
local mac_in_use=$(ifconfig -a | grep "$mac" | grep -v "^${baseifname}.${vlan}[ ]")
|
||||
if [ "$mac_in_use" ]; then
|
||||
basemac=$(ifconfig -a | grep "^$baseifname " | awk '{print $NF}')
|
||||
ifconfig ${baseifname}.${vlan} hw ether $basemac
|
||||
fi
|
||||
}
|
||||
|
||||
addbrcmvlan()
|
||||
addbrcmvlan ()
|
||||
{
|
||||
local baseifname=$1
|
||||
local vlan8021p=$2
|
||||
local vlan8021q=$3
|
||||
local bridge=$4
|
||||
local ifname=$5
|
||||
|
||||
bridge="${bridge:-0}"
|
||||
|
||||
#local ifname=$4
|
||||
#config_get baseifname $1 baseifname
|
||||
#config_get vlan8021p $1 vlan8021p
|
||||
#config_get vlan8021q $1 vlan8021q
|
||||
ifbaseexists $baseifname
|
||||
ret=$?
|
||||
if [ "$ret" -eq 1 ]; then
|
||||
@@ -98,28 +86,26 @@ addbrcmvlan()
|
||||
typ=$(uci -q get network."$net".type)
|
||||
proto=$(uci -q get network."$net".proto)
|
||||
proto="${proto:-none}"
|
||||
if [ "$typ" == "bridge" ]; then
|
||||
bridge=1
|
||||
if [ "$proto" == "none" ]; then
|
||||
unmanaged=1
|
||||
break
|
||||
fi
|
||||
if [ "$typ" == "bridge" -a "$proto" == "none" ]; then
|
||||
unmanaged=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo '1' > /proc/sys/net/ipv6/conf/$baseifname/disable_ipv6
|
||||
ifconfig $baseifname up
|
||||
if [ "x$bridge" = "x" ]; then
|
||||
bridge=0
|
||||
fi
|
||||
|
||||
if [ "$bridge" -eq 1 ]; then
|
||||
if [ "$unmanaged" == "1" ]; then
|
||||
vlanctl --if-create $baseifname $vlan8021q
|
||||
else
|
||||
vlanctl --dhcp-bridged --if-create $baseifname $vlan8021q
|
||||
check_mac_address $baseifname $vlan8021q
|
||||
fi
|
||||
else
|
||||
vlanctl --routed --if-create $baseifname $vlan8021q
|
||||
check_mac_address $baseifname $vlan8021q
|
||||
fi
|
||||
|
||||
if [ "$bridge" -eq 1 ]; then
|
||||
@@ -133,7 +119,7 @@ addbrcmvlan()
|
||||
vlanctl --if $baseifname --tx --tags 1 --filter-txif $ifname --push-tag --set-vid $vlan8021q 0 --set-pbits $vlan8021p 0 --rule-insert-before -1
|
||||
# tags 2 tx
|
||||
vlanctl --if $baseifname --tx --tags 2 --filter-txif $ifname --push-tag --set-vid $vlan8021q 0 --set-pbits $vlan8021p 0 --rule-insert-before -1
|
||||
# tags 1 rx
|
||||
# tags 1 rx
|
||||
vlanctl --if $baseifname --rx --tags 1 --filter-vid $vlan8021q 0 --pop-tag --set-rxif $ifname --rule-insert-before -1
|
||||
# tags 2 rx
|
||||
vlanctl --if $baseifname --rx --tags 2 --filter-vid $vlan8021q 0 --pop-tag --set-rxif $ifname --rule-insert-before -1
|
||||
@@ -150,8 +136,8 @@ addbrcmvlan()
|
||||
vlanctl --if $baseifname --rx --tags 1 --set-rxif $ifname --filter-vlan-dev-mac-addr 0 --drop-frame --rule-insert-before -1
|
||||
# tags 2 rx
|
||||
vlanctl --if $baseifname --rx --tags 2 --set-rxif $ifname --filter-vlan-dev-mac-addr 0 --drop-frame --rule-insert-before -1
|
||||
# tags 1 rx
|
||||
vlanctl --if $baseifname --rx --tags 1 --filter-vlan-dev-mac-addr 1 --filter-vid $vlan8021q 0 --pop-tag --set-rxif $ifname --rule-insert-before -1
|
||||
# tags 1 rx
|
||||
vlanctl --if $baseifname --rx --tags 1 --filter-vlan-dev-mac-addr 1 --filter-vid $vlan8021q 0 --pop-tag --set-rxif $ifname --rule-insert-before -1
|
||||
# tags 2 rx
|
||||
vlanctl --if $baseifname --rx --tags 2 --filter-vlan-dev-mac-addr 1 --filter-vid $vlan8021q 0 --pop-tag --set-rxif $ifname --rule-insert-before -1
|
||||
fi
|
||||
@@ -162,14 +148,12 @@ addbrcmvlan()
|
||||
}
|
||||
|
||||
|
||||
brcm_virtual_interface_rules()
|
||||
brcm_virtual_interface_rules ()
|
||||
{
|
||||
local baseifname=$1
|
||||
local ifname=$2
|
||||
local bridge=$3
|
||||
|
||||
bridge="${bridge:-0}"
|
||||
|
||||
local unmanaged=0
|
||||
local nets net typ proto
|
||||
nets=$(get_network_of "$ifname")
|
||||
@@ -177,19 +161,18 @@ brcm_virtual_interface_rules()
|
||||
typ=$(uci -q get network."$net".type)
|
||||
proto=$(uci -q get network."$net".proto)
|
||||
proto="${proto:-none}"
|
||||
|
||||
if [ "$typ" == "bridge" ]; then
|
||||
bridge=1
|
||||
if [ "$proto" == "none" ]; then
|
||||
unmanaged=1
|
||||
break
|
||||
fi
|
||||
if [ "$typ" == "bridge" -a "$proto" == "none" ]; then
|
||||
unmanaged=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo '1' > /proc/sys/net/ipv6/conf/$baseifname/disable_ipv6
|
||||
ifconfig $baseifname up
|
||||
|
||||
if [ "x$bridge" = "x" ]; then
|
||||
bridge=0
|
||||
fi
|
||||
|
||||
if [ "$bridge" -eq 1 ]; then
|
||||
if [ "$unmanaged" == "1" ]; then
|
||||
vlanctl --if-create-name $baseifname $ifname
|
||||
@@ -216,21 +199,21 @@ brcm_virtual_interface_rules()
|
||||
# tags 2 tx
|
||||
vlanctl --if $baseifname --tx --tags 2 --filter-txif $ifname --rule-insert-before -1
|
||||
# tags 0 rx
|
||||
vlanctl --if $baseifname --rx --tags 0 --set-rxif $ifname --rule-insert-last
|
||||
vlanctl --if $baseifname --rx --tags 0 --set-rxif $ifname --rule-insert-last
|
||||
# tags 1 rx
|
||||
vlanctl --if $baseifname --rx --tags 1 --set-rxif $ifname --rule-insert-last
|
||||
vlanctl --if $baseifname --rx --tags 1 --set-rxif $ifname --rule-insert-last
|
||||
# tags 2 rx
|
||||
vlanctl --if $baseifname --rx --tags 2 --set-rxif $ifname --rule-insert-last
|
||||
vlanctl --if $baseifname --rx --tags 2 --set-rxif $ifname --rule-insert-last
|
||||
else
|
||||
# tags 1 rx
|
||||
vlanctl --if $baseifname --rx --tags 1 --set-rxif $ifname --filter-vlan-dev-mac-addr 0 --drop-frame --rule-insert-before -1
|
||||
# tags 2 rx
|
||||
vlanctl --if $baseifname --rx --tags 2 --set-rxif $ifname --filter-vlan-dev-mac-addr 0 --drop-frame --rule-insert-before -1
|
||||
# tags 0 rx
|
||||
# tags 0 rx
|
||||
vlanctl --if $baseifname --rx --tags 0 --set-rxif $ifname --filter-vlan-dev-mac-addr 1 --rule-insert-before -1
|
||||
fi
|
||||
|
||||
ifconfig $ifname up
|
||||
ifconfig $ifname multicast
|
||||
ifconfig $ifname multicast
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ endef
|
||||
define Package/libcgroup-daemon
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+libcgroup +librt
|
||||
DEPENDS:=+libcgroup
|
||||
TITLE:=Control group management daemon
|
||||
URL:=https://sourceforge.net/p/libcg/
|
||||
endef
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
choice
|
||||
depends on PACKAGE_libstrophe
|
||||
prompt "Select XML library"
|
||||
default libstrophe-expat
|
||||
|
||||
config libstrophe-expat
|
||||
bool "expat"
|
||||
select PACKAGE_libexpat
|
||||
|
||||
config libstrophe-libxml2
|
||||
bool "libxml2"
|
||||
select PACKAGE_libxml2
|
||||
|
||||
endchoice
|
||||
@@ -1,61 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2015 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:=libstrophe
|
||||
PKG_VERSION:=0.8.8
|
||||
PKG_RELEASE=1
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/strophe/libstrophe/archive/
|
||||
PKG_SOURCE:=$(PKG_VERSION).tar.gz
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_libstrophe-libxml2 \
|
||||
CONFIG_libstrophe-expat
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(CONFIG_libstrophe-libxml2),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--with-libxml2
|
||||
endif
|
||||
|
||||
define Package/libstrophe
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=XMPP client library
|
||||
URL:=http://strophe.im/libstrophe
|
||||
DEPENDS:= +libopenssl +libstrophe-libxml2:libxml2 +libstrophe-expat:libexpat
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/libstrophe/description
|
||||
A simple, lightweight C library for writing XMPP clients
|
||||
endef
|
||||
|
||||
define Package/libstrophe/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libstrophe.{la,a,so*} $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libstrophe/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libstrophe.so.* $(1)/usr/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libstrophe))
|
||||
@@ -1,221 +0,0 @@
|
||||
diff --git a/src/auth.c b/src/auth.c
|
||||
index b3056a2..2673bdf 100644
|
||||
--- a/src/auth.c
|
||||
+++ b/src/auth.c
|
||||
@@ -455,7 +455,7 @@ static int _handle_scram_sha1_challenge(xmpp_conn_t * const conn,
|
||||
if (!text)
|
||||
goto err;
|
||||
|
||||
- challenge = (char *)base64_decode(conn->ctx, text, strlen(text));
|
||||
+ challenge = (char *)strophe_base64_decode(conn->ctx, text, strlen(text));
|
||||
xmpp_free(conn->ctx, text);
|
||||
if (!challenge)
|
||||
goto err;
|
||||
@@ -515,7 +515,7 @@ static char *_get_nonce(xmpp_ctx_t *ctx)
|
||||
*(time_t *)(buffer + sizeof(clock_t)) = (time_t)rand();
|
||||
}
|
||||
|
||||
- return base64_encode(ctx, buffer, sizeof(buffer));
|
||||
+ return strophe_base64_encode(ctx, buffer, sizeof(buffer));
|
||||
}
|
||||
|
||||
static char *_make_scram_sha1_init_msg(xmpp_conn_t * const conn)
|
||||
@@ -662,7 +662,7 @@ static void _auth(xmpp_conn_t * const conn)
|
||||
return;
|
||||
}
|
||||
|
||||
- str = (char *)base64_encode(conn->ctx, (unsigned char *)scram_init,
|
||||
+ str = (char *)strophe_base64_encode(conn->ctx, (unsigned char *)scram_init,
|
||||
strlen(scram_init));
|
||||
if (!str) {
|
||||
xmpp_free(conn->ctx, scram_init);
|
||||
diff --git a/src/sasl.c b/src/sasl.c
|
||||
index 3d83fd0..b6f2b89 100644
|
||||
--- a/src/sasl.c
|
||||
+++ b/src/sasl.c
|
||||
@@ -46,7 +46,7 @@ char *sasl_plain(xmpp_ctx_t *ctx, const char *authid, const char *password) {
|
||||
memcpy(msg+1, authid, idlen);
|
||||
msg[1+idlen] = '\0';
|
||||
memcpy(msg+1+idlen+1, password, passlen);
|
||||
- result = base64_encode(ctx, (unsigned char *)msg, 2 + idlen + passlen);
|
||||
+ result = strophe_base64_encode(ctx, (unsigned char *)msg, 2 + idlen + passlen);
|
||||
xmpp_free(ctx, msg);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ static hash_t *_parse_digest_challenge(xmpp_ctx_t *ctx, const char *msg)
|
||||
char *key, *value;
|
||||
unsigned char *s, *t;
|
||||
|
||||
- text = base64_decode(ctx, msg, strlen(msg));
|
||||
+ text = strophe_base64_decode(ctx, msg, strlen(msg));
|
||||
if (text == NULL) {
|
||||
xmpp_error(ctx, "SASL", "couldn't Base64 decode challenge!");
|
||||
return NULL;
|
||||
@@ -344,7 +344,7 @@ char *sasl_digest_md5(xmpp_ctx_t *ctx, const char *challenge,
|
||||
hash_release(table); /* also frees value strings */
|
||||
|
||||
/* reuse response for the base64 encode of our result */
|
||||
- response = base64_encode(ctx, (unsigned char *)result, strlen(result));
|
||||
+ response = strophe_base64_encode(ctx, (unsigned char *)result, strlen(result));
|
||||
xmpp_free(ctx, result);
|
||||
|
||||
return response;
|
||||
@@ -396,7 +396,7 @@ char *sasl_scram_sha1(xmpp_ctx_t *ctx, const char *challenge,
|
||||
goto out;
|
||||
}
|
||||
|
||||
- sval = (char *)base64_decode(ctx, s, strlen(s));
|
||||
+ sval = (char *)strophe_base64_decode(ctx, s, strlen(s));
|
||||
if (!sval) {
|
||||
goto out;
|
||||
}
|
||||
@@ -426,7 +426,7 @@ char *sasl_scram_sha1(xmpp_ctx_t *ctx, const char *challenge,
|
||||
sign[j] ^= key[j];
|
||||
}
|
||||
|
||||
- sign_b64 = base64_encode(ctx, sign, sizeof(sign));
|
||||
+ sign_b64 = strophe_base64_encode(ctx, sign, sizeof(sign));
|
||||
if (!sign_b64) {
|
||||
goto out_response;
|
||||
}
|
||||
@@ -439,7 +439,7 @@ char *sasl_scram_sha1(xmpp_ctx_t *ctx, const char *challenge,
|
||||
strcat(response, sign_b64);
|
||||
xmpp_free(ctx, sign_b64);
|
||||
|
||||
- response_b64 = base64_encode(ctx, (unsigned char *)response,
|
||||
+ response_b64 = strophe_base64_encode(ctx, (unsigned char *)response,
|
||||
strlen(response));
|
||||
if (!response_b64) {
|
||||
goto out_response;
|
||||
@@ -501,7 +501,7 @@ int base64_encoded_len(xmpp_ctx_t *ctx, const unsigned len)
|
||||
return ((len + 2)/3) << 2;
|
||||
}
|
||||
|
||||
-char *base64_encode(xmpp_ctx_t *ctx,
|
||||
+char *strophe_base64_encode(xmpp_ctx_t *ctx,
|
||||
const unsigned char * const buffer, const unsigned len)
|
||||
{
|
||||
int clen;
|
||||
@@ -579,7 +579,7 @@ int base64_decoded_len(xmpp_ctx_t *ctx,
|
||||
return 3 * (len >> 2) - nudge;
|
||||
}
|
||||
|
||||
-unsigned char *base64_decode(xmpp_ctx_t *ctx,
|
||||
+unsigned char *strophe_base64_decode(xmpp_ctx_t *ctx,
|
||||
const char * const buffer, const unsigned len)
|
||||
{
|
||||
int dlen;
|
||||
diff --git a/src/sasl.h b/src/sasl.h
|
||||
index bc7511a..98c27bf 100644
|
||||
--- a/src/sasl.h
|
||||
+++ b/src/sasl.h
|
||||
@@ -32,13 +32,13 @@ char *sasl_scram_sha1(xmpp_ctx_t *ctx, const char *challenge,
|
||||
|
||||
int base64_encoded_len(xmpp_ctx_t *ctx, const unsigned len);
|
||||
|
||||
-char *base64_encode(xmpp_ctx_t *ctx,
|
||||
+char *strophe_base64_encode(xmpp_ctx_t *ctx,
|
||||
const unsigned char * const buffer, const unsigned len);
|
||||
|
||||
int base64_decoded_len(xmpp_ctx_t *ctx,
|
||||
const char * const buffer, const unsigned len);
|
||||
|
||||
-unsigned char *base64_decode(xmpp_ctx_t *ctx,
|
||||
+unsigned char *strophe_base64_decode(xmpp_ctx_t *ctx,
|
||||
const char * const buffer, const unsigned len);
|
||||
|
||||
#endif /* _LIBXMPP_SASL_H__ */
|
||||
diff --git a/tests/test_base64.c b/tests/test_base64.c
|
||||
index 9e16862..82995b4 100644
|
||||
--- a/tests/test_base64.c
|
||||
+++ b/tests/test_base64.c
|
||||
@@ -45,31 +45,31 @@ static const char base64_5[] =
|
||||
int test_encode(xmpp_ctx_t *ctx)
|
||||
{
|
||||
char *result;
|
||||
- result = base64_encode(ctx, text_1, strlen(text_1));
|
||||
+ result = strophe_base64_encode(ctx, text_1, strlen(text_1));
|
||||
if (result == NULL) return 2;
|
||||
if (strlen(result) != strlen(base64_1)) return 1;
|
||||
if (strncmp(base64_1, result, strlen(base64_1))) return 1;
|
||||
xmpp_free(ctx,result);
|
||||
|
||||
- result = base64_encode(ctx, text_2, strlen(text_2));
|
||||
+ result = strophe_base64_encode(ctx, text_2, strlen(text_2));
|
||||
if (result == NULL) return 2;
|
||||
if (strlen(result) != strlen(base64_2)) return 1;
|
||||
if (strncmp(base64_2, result, strlen(base64_2))) return 1;
|
||||
xmpp_free(ctx,result);
|
||||
|
||||
- result = base64_encode(ctx, text_3, strlen(text_3));
|
||||
+ result = strophe_base64_encode(ctx, text_3, strlen(text_3));
|
||||
if (result == NULL) return 2;
|
||||
if (strlen(result) != strlen(base64_3)) return 1;
|
||||
if (strncmp(base64_3, result, strlen(base64_3))) return 1;
|
||||
xmpp_free(ctx,result);
|
||||
|
||||
- result = base64_encode(ctx, text_4, strlen(text_4));
|
||||
+ result = strophe_base64_encode(ctx, text_4, strlen(text_4));
|
||||
if (result == NULL) return 2;
|
||||
if (strlen(result) != strlen(base64_4)) return 1;
|
||||
if (strncmp(base64_4, result, strlen(base64_4))) return 1;
|
||||
xmpp_free(ctx,result);
|
||||
|
||||
- result = base64_encode(ctx, text_5, strlen(text_5));
|
||||
+ result = strophe_base64_encode(ctx, text_5, strlen(text_5));
|
||||
if (result == NULL) return 2;
|
||||
if (strlen(result) != strlen(base64_5)) return 1;
|
||||
if (strncmp(base64_5, result, strlen(base64_5))) return 1;
|
||||
@@ -83,31 +83,31 @@ int test_decode(xmpp_ctx_t *ctx)
|
||||
{
|
||||
unsigned char *result;
|
||||
|
||||
- result = base64_decode(ctx, base64_1, strlen(base64_1));
|
||||
+ result = strophe_base64_decode(ctx, base64_1, strlen(base64_1));
|
||||
if (result == NULL) return 2;
|
||||
if (strlen(result) != strlen(text_1)) return 1;
|
||||
if (strncmp(text_1, result, strlen(text_1))) return 1;
|
||||
xmpp_free(ctx,result);
|
||||
|
||||
- result = base64_decode(ctx, base64_2, strlen(base64_2));
|
||||
+ result = strophe_base64_decode(ctx, base64_2, strlen(base64_2));
|
||||
if (result == NULL) return 2;
|
||||
if (strlen(result) != strlen(text_2)) return 1;
|
||||
if (strncmp(text_2, result, strlen(text_2))) return 1;
|
||||
xmpp_free(ctx,result);
|
||||
|
||||
- result = base64_decode(ctx, base64_3, strlen(base64_3));
|
||||
+ result = strophe_base64_decode(ctx, base64_3, strlen(base64_3));
|
||||
if (result == NULL) return 2;
|
||||
if (strlen(result) != strlen(text_3)) return 1;
|
||||
if (strncmp(text_3, result, strlen(text_3))) return 1;
|
||||
xmpp_free(ctx,result);
|
||||
|
||||
- result = base64_decode(ctx, base64_4, strlen(base64_4));
|
||||
+ result = strophe_base64_decode(ctx, base64_4, strlen(base64_4));
|
||||
if (result == NULL) return 2;
|
||||
if (strlen(result) != strlen(text_4)) return 1;
|
||||
if (strncmp(text_4, result, strlen(text_4))) return 1;
|
||||
xmpp_free(ctx,result);
|
||||
|
||||
- result = base64_decode(ctx, base64_5, strlen(base64_5));
|
||||
+ result = strophe_base64_decode(ctx, base64_5, strlen(base64_5));
|
||||
if (result == NULL) return 2;
|
||||
if (strlen(result) != strlen(text_5)) return 1;
|
||||
if (strncmp(text_5, result, strlen(text_5))) return 1;
|
||||
@@ -130,13 +130,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
printf("testing encode... ");
|
||||
ret = test_encode(ctx);
|
||||
- if (ret) printf("base64_encode failed!\n");
|
||||
+ if (ret) printf("strophe_base64_encode failed!\n");
|
||||
if (ret) return ret;
|
||||
printf("ok.\n");
|
||||
|
||||
printf("testing decode... ");
|
||||
ret = test_decode(ctx);
|
||||
- if (ret) printf("base64_decode failed!\n");
|
||||
+ if (ret) printf("strophe_base64_decode failed!\n");
|
||||
if (ret) return ret;
|
||||
printf("ok.\n");
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libtrace
|
||||
PKG_VERSION:=3.0.22
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/apietila/libtrace.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_VERSION:=HEAD
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/uclibc++.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libtrace/Default
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Libtrace library for packet trace processing
|
||||
URL:=http://research.wand.net.nz/software/libtrace.php
|
||||
endef
|
||||
|
||||
define Package/libtrace
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Libtrace library for packet trace processing
|
||||
URL:=http://research.wand.net.nz/software/libtrace.php
|
||||
DEPENDS:=+libpcap +libpthread +zlib +libbz2 +liblzo +librt $(CXX_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/libtrace/description
|
||||
Network trace processing library for trace processing. Supports multiple
|
||||
input methods, including device capture, raw and gz-compressed
|
||||
trace, and sockets.
|
||||
endef
|
||||
|
||||
define Package/libtrace-tools
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Libtrace tools for packet trace processing
|
||||
URL:=http://research.wand.net.nz/software/libtrace.php
|
||||
DEPENDS:=+libncurses +libtrace
|
||||
endef
|
||||
|
||||
define Package/libtrace-tools/description
|
||||
Network trace processing tools for trace processing.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--with-bzip2 \
|
||||
--with-zlib \
|
||||
--with-lzo \
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtrace.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwandio.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump.{a,so*} $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libtrace/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libtrace.so.* $(1)/usr/lib/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libwandio.so.* $(1)/usr/lib/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump.so.* $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/libpacketdump
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump/*.so* $(1)/usr/lib/libpacketdump/
|
||||
endef
|
||||
|
||||
define Package/libtrace-tools/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{traceanon,tracediff,traceends,tracepktdump,tracereplay,tracereport,tracertstats,tracesplit,tracestats} $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libtrace))
|
||||
$(eval $(call BuildPackage,libtrace-tools))
|
||||
|
||||
122
lmbench/Makefile
122
lmbench/Makefile
@@ -1,122 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 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:=lmbench
|
||||
PKG_VERSION:=3.0-a9
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
|
||||
PKG_SOURCE_URL:=@SF/lmbench/
|
||||
PKG_MD5SUM:=b3351a3294db66a72e2864a199d37cbf
|
||||
|
||||
PKG_BUILD_DEPENDS:=librpc
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/lmbench
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=lmbench microbenchmarks
|
||||
URL:=http://sourceforge.net/projects/lmbench
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/lmbench/description
|
||||
lmbench is a series of micro benchmarks intended to measure basic operating
|
||||
system and hardware system metrics.
|
||||
endef
|
||||
|
||||
define Package/lmbench/install
|
||||
true
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/src \
|
||||
CC="$(TARGET_CC)" \
|
||||
AR="$(TARGET_CROSS)ar" \
|
||||
OS="$(ARCH)" \
|
||||
BASE="$(PKG_INSTALL_DIR)" \
|
||||
LDLIBS="-lrpc" \
|
||||
COMPILE="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
|
||||
lmbench install
|
||||
endef
|
||||
|
||||
define PartGen
|
||||
define Package/lmbench-$(subst _,-,$(1))
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=$(1) microbenchmark
|
||||
URL:=http://sourceforge.net/projects/lmbench
|
||||
DEPENDS:=lmbench +librpc
|
||||
endef
|
||||
endef
|
||||
|
||||
define PartInstall
|
||||
define Package/lmbench-$(subst _,-,$(1))/install
|
||||
$(INSTALL_DIR) $$(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/$(1) $$(1)/usr/sbin/$(1)
|
||||
endef
|
||||
endef
|
||||
|
||||
LMBENCH_FILES:= \
|
||||
bw_file_rd \
|
||||
bw_mem \
|
||||
bw_mmap_rd \
|
||||
bw_pipe \
|
||||
bw_tcp \
|
||||
bw_unix \
|
||||
cache \
|
||||
disk \
|
||||
enough \
|
||||
flushdisk \
|
||||
hello \
|
||||
lat_cmd \
|
||||
lat_connect \
|
||||
lat_ctx \
|
||||
lat_dram_page \
|
||||
lat_fcntl \
|
||||
lat_fifo \
|
||||
lat_fs \
|
||||
lat_http \
|
||||
lat_mem_rd \
|
||||
lat_mmap \
|
||||
lat_ops \
|
||||
lat_pagefault \
|
||||
lat_pipe \
|
||||
lat_pmake \
|
||||
lat_proc \
|
||||
lat_rand \
|
||||
lat_rpc \
|
||||
lat_select \
|
||||
lat_sem \
|
||||
lat_sig \
|
||||
lat_syscall \
|
||||
lat_tcp \
|
||||
lat_udp \
|
||||
lat_unix \
|
||||
lat_unix_connect \
|
||||
lat_usleep \
|
||||
line \
|
||||
lmdd \
|
||||
lmhttp \
|
||||
loop_o \
|
||||
memsize \
|
||||
mhz \
|
||||
msleep \
|
||||
par_mem \
|
||||
par_ops \
|
||||
stream \
|
||||
timing_o \
|
||||
tlb
|
||||
|
||||
$(foreach file,$(LMBENCH_FILES),$(eval $(call PartGen,$(file))))
|
||||
$(foreach file,$(LMBENCH_FILES),$(eval $(call PartInstall,$(file))))
|
||||
|
||||
$(eval $(call BuildPackage,lmbench))
|
||||
$(foreach file,$(LMBENCH_FILES),$(eval $(call BuildPackage,lmbench-$(subst _,-,$(file)))))
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/src/bench.h
|
||||
+++ b/src/bench.h
|
||||
@@ -77,7 +77,7 @@ typedef long long int64;
|
||||
#endif /* HAVE_int64_t */
|
||||
#endif /* HAVE_int64 */
|
||||
|
||||
-#ifndef HAVE_socklen_t
|
||||
+#if (!defined(HAVE_socklen_t) && !defined(__socklen_t_defined))
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -144,6 +144,7 @@ install-target:
|
||||
if [ ! -d $(BASE)/include ]; then mkdir $(BASE)/include; fi
|
||||
if [ ! -d $(BASE)/lib ]; then mkdir $(BASE)/lib; fi
|
||||
cp $(EXES) $(BASE)/bin
|
||||
+ cp $(OPT_EXES) $(BASE)/bin
|
||||
cp $(INCS) $(BASE)/include
|
||||
cp $O/lmbench.a $(BASE)/lib/libmbench.a
|
||||
cd ../doc; env MAKEFLAGS="$(MAKEFLAGS)" make CC="${CC}" OS="${OS}" BASE="$(BASE)" install
|
||||
@@ -1,30 +0,0 @@
|
||||
--- a/scripts/build
|
||||
+++ b/scripts/build
|
||||
@@ -18,7 +18,7 @@ done
|
||||
|
||||
trap 'rm -f ${BASE}$$.s ${BASE}$$.c ${BASE}$$.o ${BASE}$$; exit 1' 1 2 15
|
||||
|
||||
-LDLIBS=-lm
|
||||
+LDLIBS=${LDLIBS-"-lm -lrpc"}
|
||||
|
||||
# check for HP-UX's ANSI compiler
|
||||
echo "main(int ac, char *av[]) { int i; }" > ${BASE}$$.c
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -38,6 +38,7 @@ CC=`../scripts/compiler`
|
||||
MAKE=`../scripts/make`
|
||||
AR=ar
|
||||
ARCREATE=cr
|
||||
+LDLIBS=
|
||||
|
||||
# base of installation location
|
||||
BASE=/usr/local
|
||||
@@ -111,7 +112,7 @@ LIBOBJS= $O/lib_tcp.o $O/lib_udp.o $O/li
|
||||
$O/lib_sched.o
|
||||
|
||||
lmbench: $(UTILS)
|
||||
- @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="$(CC)" OS="$(OS)" ../scripts/build all
|
||||
+ @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="$(CC)" OS="$(OS)" LDLIBS="$(LDLIBS)" ../scripts/build all
|
||||
-@env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="k$(MAKEFLAGS)" CC="$(CC)" OS="$(OS)" ../scripts/build opt
|
||||
|
||||
results: lmbench
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/src/bw_mem.c
|
||||
+++ b/src/bw_mem.c
|
||||
@@ -65,7 +65,7 @@ main(int ac, char **av)
|
||||
size_t nbytes;
|
||||
state_t state;
|
||||
int c;
|
||||
- char *usage = "[-P <parallelism>] [-W <warmup>] [-N <repetitions>] <size> what [conflict]\nwhat: rd wr rdwr cp fwr frd fcp bzero bcopy\n<size> must be larger than 512";
|
||||
+ char *usage = "[-P <parallelism>] [-W <warmup>] [-N <repetitions>] <size> what [conflict]\nwhat: rd wr rdwr cp fwr frd fcp bzero bcopy\n<size> must be larger than 512\n";
|
||||
|
||||
state.overhead = 0;
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=logrotate
|
||||
PKG_VERSION:=3.7.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
|
||||
PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/l/logrotate
|
||||
PKG_MD5SUM:=552639142e163745f6bcd4f1f3816d8a
|
||||
PKG_CAT:=zcat
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/logrotate
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libpopt
|
||||
TITLE:=rotates, compresses, and mails system logs
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call Build/Compile/Default, \
|
||||
RPM_OPT_FLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS)" \
|
||||
LDFLAGS="$(EXTRA_LDFLAGS)" \
|
||||
logrotate \
|
||||
)
|
||||
endef
|
||||
|
||||
define Package/logrotate/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(CP) ./files/logrotate.conf $(1)/etc/
|
||||
$(INSTALL_DIR) $(1)/etc/logrotate.d
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,logrotate))
|
||||
@@ -1,30 +0,0 @@
|
||||
# rotate log files weekly
|
||||
weekly
|
||||
#daily
|
||||
|
||||
# keep 4 weeks worth of backlogs
|
||||
rotate 4
|
||||
|
||||
# create new (empty) log files after rotating old ones
|
||||
create
|
||||
|
||||
notifempty
|
||||
nomail
|
||||
#olddir /var/log/backup/
|
||||
missingok
|
||||
#dateext
|
||||
|
||||
# uncomment this if you want your log files compressed
|
||||
#compress
|
||||
|
||||
# packages can drop log rotation information into this directory
|
||||
include /etc/logrotate.d
|
||||
|
||||
# no packages own lastlog or wtmp -- we'll rotate them here
|
||||
#/var/log/wtmp {
|
||||
# monthly
|
||||
# create 0664 root utmp
|
||||
# rotate 1
|
||||
#}
|
||||
|
||||
# system-specific logs may be also be configured here.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user