Compare commits

..

1 Commits

Author SHA1 Message Date
Fredrik Åsberg
266995c2b4 questd: update 2016-04-19 16:43:25 +02:00
61 changed files with 547 additions and 4110 deletions

View File

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

View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk18-mod
PKG_VERSION:=1.8.10.1
PKG_SOURCE_VERSION:=1618b4881a44ea493c602da5c60723c45509719a
PKG_SOURCE_VERSION:=2239c2d0e790abfce7ac0684dbbac1cf9c0aff40
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"
@@ -373,9 +392,6 @@ CONFIGURE_ARGS+= \
--with-sounds-cache="$(DL_DIR)" \
--disable-xmldoc
# I've had strange errors with -fno-caller-saves
# in global CFLAGS so revert it. /Ronny
EXTRA_CFLAGS+= -O2 -fcaller-saves
EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
EXTRA_LDFLAGS+= $(TARGET_LDFLAGS)
@@ -552,6 +568,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/
@@ -703,6 +730,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))

81
bluez/Makefile Normal file
View 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
View 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))

View File

@@ -0,0 +1,2 @@
config info 'Device'
option mac 'D0:39:72:B6:23:D6'

View 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
}

View File

@@ -11,10 +11,14 @@ PKG_RELEASE:=1
PKG_VERSION:=1.1.0
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=46658e95b19c35ff6194a9566bb5439720ec251d
PKG_SOURCE_VERSION:=666c3e93ad56e20493bae8a439e9655ce947f2f7
PKG_NAME:=dectmngr2
LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib
RSTRIP:=true
export BUILD_DIR
@@ -39,15 +43,12 @@ endef
define Package/dectmngr2/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/dect/
$(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dectmngr2 $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/target.bin $(1)/etc/dect/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/nvs_default $(1)/etc/dect/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dect $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dectmngr-wrapper.sh $(1)/usr/sbin/
$(CP) ./files/dect.config $(1)/etc/config/dect
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dect $(1)/etc/init.d/
endef
$(eval $(call BuildPackage,dectmngr2))

View File

@@ -1,4 +0,0 @@
config dect 'dect'
option radio 'auto'

View File

@@ -16,25 +16,26 @@ export PLATFORM_INCLUDE:=platforms/iopsys/build.mk
export DATE:=$(shell date +%Y-%m-%d-%H-%M-%S)
export LOGIN:=$(shell whoami)
BASE_PKG_VERSION:=3.4.1
PKG_RELEASE:=RC11
PKG_RELEASE:=RC9
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
export PKG_VERSION
###########################--RELEASE--################################
PKG_SOURCE_VERSION:=184d29446fe6103f567c968bf35569625326a82c
PKG_SOURCE_URL:=ssh://git@private.inteno.se/ice-client.git
PKG_SOURCE_VERSION:=d3065ee24d72d3fffd5ff75b617bf54fb5377561
ifeq ($(CONFIG_ICE_OPEN),y)
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_KERNEL_PROFILE)-$(BASE_PKG_VERSION)$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
#PKG_NAME:=ice-client-open
else
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@private.inteno.se:ice-client.git
PKG_SOURCE_URL:=ssh://git@private.inteno.se/ice-client.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BASE_PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(BASE_PKG_VERSION)-$(PKG_RELEASE).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BASE_PKG_VERSION)
PKG_SOURCE_PROTO:=git
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(BASE_PKG_VERSION)
endif
@@ -139,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} $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/core/lib/{systemService.so.1.0.1,libconfStore.so.1,networkService.so.1.0.1,packageService.so.1.0.1,monitorService.so.1.0.1,iperfService.so.1.0.1,logService.so.1.0.1} $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/wsice/obj/iopsys/libwsice.so $(1)/usr/lib
$(INSTALL_DIR) $(1)/bin/ifs/iperf/execute
$(INSTALL_DIR) $(1)/bin/ifs/iperf/progress
@@ -165,8 +166,8 @@ cp /tmp/iopsysserver.ini /etc/iopsys/server.ini
rm -f /tmp/iopsysserver.ini
cp /tmp/ice.back /etc/config/ice
rm -f /tmp/ice.back
if [ -f "/etc/rc.d/S98ice-client" ]; then
/etc/init.d/ice-client restart
if [ -f "/etc/rc.d/S99ice-client" ]; then
/etc/init.d/ice-client start
fi
exit 0
endef
@@ -886,55 +887,6 @@ fi
exit 0
endef
# texec
define Package/ice-client-texec
$(call Package/ice-client/Default)
TITLE:=texec
DEPENDS+=
endef
define Package/ice-client-texec/description
remote script execution module for ice-client
endef
define Package/ice-client-texec/prerm
#!/bin/sh
if [ ! -f "/tmp/ice.pid" ] ; then exit 0 ; fi
PROC_ID=$$(cat /tmp/ice.pid)
PROC_EXISTS=$$(/usr/bin/pgrep -P $${PROC_ID})
if [ -n "$$PROC_EXISTS" ]; then
read -t 1 <>/tmp/cfout
echo "system moduleRemove topic=texec" > /tmp/cfin
fi
exit 0
endef
define Package/ice-client-texec/preinst
#!/bin/sh
if [ ! -f "/tmp/ice.pid" ] ; then exit 0 ; fi
PROC_ID=$$(cat /tmp/ice.pid)
PROC_EXISTS=$$(/usr/bin/pgrep -P $${PROC_ID})
if [ -n "$$PROC_EXISTS" ]; then
read -t 1 <>/tmp/cfout
echo "system moduleRemove topic=tExecMgr" > /tmp/cfin
fi
exit 0
endef
define Package/ice-client-texec/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/core/lib/texecService.so.1.0.1 $(1)/usr/lib
endef
define Package/ice-client-texec/postinst
#!/bin/sh
read -t 1 <>/tmp/cfout
if [ -f /tmp/ice.pid ]; then
echo "system moduleAdd file=texecService.so.1.0.1" package="ice-client-texec" > /tmp/cfin
fi
exit 0
endef
# bmspeedtest
define Package/ice-client-bcmspeedmgr
$(call Package/ice-client/Default)
@@ -983,6 +935,5 @@ $(eval $(call BuildPackage,ice-client-rework))
$(eval $(call BuildPackage,ice-client-sip))
$(eval $(call BuildPackage,ice-client-monitor))
$(eval $(call BuildPackage,ice-client-gigaset))
$(eval $(call BuildPackage,ice-client-texec))
$(eval $(call BuildPackage,ice-client-bcmspeedmgr))
endif

View File

@@ -3,42 +3,42 @@ config cgroups cgroups
option defgroup iopsys/normal
config cgroup _root_
# list option cpu.rt_runtime_us=50000
list option cpu.rt_runtime_us=50000
list option memory.move_charge_at_immigrate=1
config cgroup iopsys
list option cpu.shares=4096
# list option cpu.rt_runtime_us=40000
list option cpu.rt_runtime_us=40000
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup iopsys_normal
list option cpu.shares=1024
# list option cpu.rt_runtime_us=10000
list option cpu.rt_runtime_us=10000
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup iopsys_high
list option cpu.shares=4096
# list option cpu.rt_runtime_us=30000
list option cpu.rt_runtime_us=30000
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup 3prt
list option cpu.shares=1024
# list option cpu.rt_runtime_us=10000
list option cpu.rt_runtime_us=10000
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config cgroup 3prt_normal
list option cpu.shares=1024
# list option cpu.rt_runtime_us=2500
list option cpu.rt_runtime_us=2500
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config cgroup 3prt_high
list option cpu.shares=4096
# list option cpu.rt_runtime_us=7500
list option cpu.rt_runtime_us=7500
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1

View File

@@ -15,31 +15,10 @@ config CWMP_ACS_HDM
bool "HDM"
endchoice
choice
prompt "Select Data Model"
default tr098
config DATAMODEL_TR098
bool "TR-098"
config DATAMODEL_TR181
bool "TR-181"
endchoice
config CWMP_DEBUG
bool "Compile with debug options"
default y
choice
prompt "enable xmpp feature"
default disable
config XMPP_DISABLE
bool "disable"
config XMPP_ENABLE
bool "enable"
endchoice
config CWMP_DEVEL_DEBUG
bool "Compile with development debug options"
default n

11
icwmp/Makefile Executable file → Normal file
View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=3.0-2016-06-02
PKG_VERSION:=3.0-2016-03-30
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3796902ebf44c3cd00b3829ef7aca911cdde2cc7
PKG_SOURCE_VERSION:=5de240514b73aff51301df4d41b88f762bca89df
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 +bcmkernel +curl
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt
endef
define Package/icwmp/description
@@ -68,7 +68,7 @@ endif
TARGET_CFLAGS += \
-D_GNU_SOURCE -D_AADJ
ifneq ($(CWMP_REVISION)_,_)
ifneq ($(CWMP_REVISION),exported)
ifneq ($(CWMP_REVISION),Unversioned directory)
@@ -86,9 +86,6 @@ CONFIGURE_ARGS += \
--with-libubox-include-path=$(STAGING_DIR)/usr/include \
--with-libubus-include-path=$(STAGING_DIR)/usr/include
CONFIGURE_ARGS += $(if $(CONFIG_DATAMODEL_TR181),--enable-datamodel=tr181,--enable-datamodel=tr098)
CONFIGURE_ARGS += $(if $(CONFIG_XMPP_ENABLE),--enable-xmpp=enable,--enable-xmpp=disable)
ifeq ($(BUILD_VARIANT),zstream)
CONFIGURE_ARGS += \
--enable-http=zstream \

View File

@@ -1,192 +0,0 @@
CONFIG_BUILD_NLS=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_CCACHE=y
CONFIG_DEBUG=y
CONFIG_DEVEL=y
CONFIG_LOCALMIRROR="http://mirror.inteno.se/mirror"
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-ncm=y
CONFIG_PACKAGE_crashlog=y
CONFIG_PACKAGE_ddns-scripts=y
CONFIG_PACKAGE_ds-lite=y
CONFIG_PACKAGE_gdb=m
CONFIG_PACKAGE_gdbserver=m
CONFIG_PACKAGE_getopt=y
CONFIG_PACKAGE_glib2=y
CONFIG_PACKAGE_ice-client=y
CONFIG_PACKAGE_ice-client-camerawatch=m
CONFIG_PACKAGE_ice-client-fileme=m
CONFIG_PACKAGE_ice-client-gigaset=m
CONFIG_PACKAGE_ice-client-guest=m
CONFIG_PACKAGE_ice-client-iperf=m
CONFIG_PACKAGE_ice-client-logreader=m
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_icwmp-curl=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
CONFIG_PACKAGE_juci-broadcom-dsl=y
CONFIG_PACKAGE_juci-broadcom-ethernet=y
CONFIG_PACKAGE_juci-broadcom-iptv=y
CONFIG_PACKAGE_juci-broadcom-pwrmgmt=y
CONFIG_PACKAGE_juci-broadcom-vlan=y
CONFIG_PACKAGE_juci-broadcom-wl=y
CONFIG_PACKAGE_juci-broadcom-xdsl=y
CONFIG_PACKAGE_juci-ddns=y
CONFIG_PACKAGE_juci-diagnostics=y
CONFIG_PACKAGE_juci-dnsmasq-dhcp=y
CONFIG_PACKAGE_juci-dropbear=y
CONFIG_PACKAGE_juci-ethernet=y
CONFIG_PACKAGE_juci-event=y
CONFIG_PACKAGE_juci-firewall-fw3=y
CONFIG_PACKAGE_juci-icwmp=y
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-qos=y
CONFIG_PACKAGE_juci-inteno-voice-client=y
CONFIG_PACKAGE_juci-macdb=y
CONFIG_PACKAGE_juci-minidlna=y
CONFIG_PACKAGE_juci-mod-status=y
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-printer=y
CONFIG_PACKAGE_juci-samba=y
CONFIG_PACKAGE_juci-simple-gui=y
CONFIG_PACKAGE_juci-snmpd=y
CONFIG_PACKAGE_juci-sysupgrade=y
CONFIG_PACKAGE_juci-theme-inteno=y
CONFIG_PACKAGE_juci-ubus-core=y
CONFIG_PACKAGE_juci-upnp=y
CONFIG_PACKAGE_juci-usb=y
CONFIG_PACKAGE_juci-utils=y
# CONFIG_PACKAGE_kmod-ipt-nathelper is not set
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_libdaemon=y
CONFIG_PACKAGE_libgmp=y
CONFIG_PACKAGE_libreadline=y
CONFIG_PACKAGE_minidlna=y
CONFIG_PACKAGE_miniupnpd=y
CONFIG_PACKAGE_mtd-utils=y
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_multiwan=y
CONFIG_PACKAGE_ndisc6=y
CONFIG_PACKAGE_netcheck=y
CONFIG_PACKAGE_ntfs-3g=y
CONFIG_PACKAGE_odhcp6c=y
CONFIG_PACKAGE_odhcpd=y
CONFIG_PACKAGE_openssl-util=y
CONFIG_PACKAGE_openvpn-easy-rsa=y
CONFIG_PACKAGE_openvpn-openssl=y
CONFIG_PACKAGE_p910nd=y
CONFIG_PACKAGE_peripheral_manager=y
CONFIG_PACKAGE_port-management=y
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_resolveip=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_samba3=y
CONFIG_PACKAGE_samba3-nmbd=y
CONFIG_PACKAGE_snmpd=y
CONFIG_PACKAGE_strace=y
CONFIG_PACKAGE_tc=y
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_wwan=y
CONFIG_PACKAGE_xl2tpd=y
CONFIG_PACKAGE_zoneinfo-core=y
CONFIG_PACKAGE_zoneinfo-europe=y
CONFIG_TARGET_CUSTOMER="INT"
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_DELUSER=y
# CONFIG_BUSYBOX_CONFIG_DEVMEM is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_8021Q=y
CONFIG_BUSYBOX_CONFIG_FIRST_SYSTEM_ID=100
CONFIG_BUSYBOX_CONFIG_HTTPD=y
CONFIG_BUSYBOX_CONFIG_INSMOD=y
CONFIG_BUSYBOX_CONFIG_LAST_SYSTEM_ID=999
CONFIG_BUSYBOX_CONFIG_LOGIN=y
CONFIG_BUSYBOX_CONFIG_LSMOD=y
CONFIG_BUSYBOX_CONFIG_LSPCI=y
CONFIG_BUSYBOX_CONFIG_LSUSB=y
CONFIG_BUSYBOX_CONFIG_MICROCOM=y
CONFIG_BUSYBOX_CONFIG_RMMOD=y
CONFIG_BUSYBOX_CONFIG_STTY=y
CONFIG_BUSYBOX_CONFIG_TFTP=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_2_4_MODULES is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_CGI=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_GZIP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_PROXY=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_NOLOGIN is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_SECURETTY=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY is not set
# 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_LOGIN_SCRIPTS is not set
# CONFIG_BUSYBOX_CONFIG_LOGIN_SESSION_AS_CHILD is not set
# CONFIG_BUSYBOX_CONFIG_PAM is not set
# CONFIG_BUSYBOX_CONFIG_TFTP_DEBUG is not set
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

View File

@@ -1,38 +0,0 @@
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-mod-admin-core=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-app-ddns=y
CONFIG_PACKAGE_luci-app-dslstats=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-iup=y
CONFIG_PACKAGE_luci-app-mcpd=y
CONFIG_PACKAGE_luci-app-minidlna=y
CONFIG_PACKAGE_luci-app-multiwan=y
CONFIG_PACKAGE_luci-app-p910nd=y
CONFIG_PACKAGE_luci-app-parental-control=y
CONFIG_PACKAGE_luci-app-port-management=y
CONFIG_PACKAGE_luci-app-power-mgmt=y
CONFIG_PACKAGE_luci-app-samba=y
CONFIG_PACKAGE_luci-app-sfp=y
CONFIG_PACKAGE_luci-app-snmp=y
CONFIG_PACKAGE_luci-app-speedtest=y
CONFIG_PACKAGE_luci-app-upnp=y
CONFIG_PACKAGE_luci-app-voice=y
CONFIG_PACKAGE_luci-theme-base=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-i18n-english=y
CONFIG_PACKAGE_luci-proto-3g=y
CONFIG_PACKAGE_luci-proto-4g=y
CONFIG_PACKAGE_luci-proto-core=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-sgi-cgi=y
CONFIG_PACKAGE_luci-lib-core=y
CONFIG_PACKAGE_luci-lib-core_source=y
CONFIG_PACKAGE_luci-lib-ipkg=y
CONFIG_PACKAGE_luci-lib-json=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-lib-nixio_notls=y
CONFIG_PACKAGE_luci-lib-sys=y
CONFIG_PACKAGE_luci-lib-web=y

View File

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

View File

@@ -1,42 +0,0 @@
# this is a developer helper script to install firmware on a remote host running in CFE mode
function usage {
echo "usage: $0 cfe_upgrade <host> <file>"
}
function cfe_upgrade {
if [ -z "$1" ] ; then
usage
echo "Error: host required"
exit 1
fi
if [ -z "$2" ] ; then
usage
echo "Error: firmware filename required"
exit 1
fi
if [ ! -e $2 ] ; then
usage
echo "Error: firmware file does not exist"
exit 1
fi
IMAGE=`basename $2`
echo "CFE upgrade host: $1 with file $IMAGE"
[ "$2" ] && [ -e "$2" ] && curl -i -F filedata=@$2 http://$1/upload.cgi && echo "upgrade done!"
}
register_command "cfe_upgrade" "<host> <file> Install firmware on remote host in CFE mode"
function cfe_upgrade_latest {
if [ -z "$1" ] ; then
echo "usage: $0 cfe_upgrade_latest <host>"
echo "Error: host required"
exit 1
fi
{ cd `dirname $0`
IMAGE=`ls -Art bin/*/*.w | tail -n1`
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop cfe_upgrade $1 $IMAGE
}
}
register_command "cfe_upgrade_latest" "<host> Install latest firmware on remote host in CFE mode"

View File

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

View File

@@ -30,7 +30,6 @@ function feeds_update {
fi
./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
@@ -43,9 +42,6 @@ function feeds_update {
./scripts/feeds install -f -p feed_inteno_packages mtd-utils
./scripts/feeds uninstall qrencode
./scripts/feeds install -f -p feed_inteno_packages qrencode
./scripts/feeds uninstall libwebsockets
./scripts/feeds uninstall libwebsockets-openssl
./scripts/feeds install -f -p feed_inteno_juci libwebsockets
rm -rf package/feeds/oldpackages/libzstream # have to run this for now since uninstall is not working every time

View File

@@ -5,10 +5,11 @@ function genconfig {
export IMPORT=0
export SRCTREEOVERR=0
export FILEDIR="files/"
export CONFIGPATH="package/feeds/feed_inteno_packages/iop/configs"
export CONFIGPATH="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"
@@ -139,18 +140,15 @@ function genconfig {
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
v "cp $CONFIGPATH/MASTER/config .config"
cp $CONFIGPATH/MASTER/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
if [ -e "$CONFIGPATH/MASTER/$PROFILE.diff" ]; then
generate_config configs/MASTER/$PROFILE.diff .config
elif [ "$PROFILE" == "juci" ]; then
v "Default profile (juci) is selected."
else
@@ -174,7 +172,7 @@ function genconfig {
fi
if [ -e "$CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff" ]; then
v "Apply $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff"
cat $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff >> .config
generate_config $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff .config
fi
fi
@@ -188,29 +186,27 @@ function genconfig {
echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
# Set default values based on selected parameters
make defconfig
# 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
[ $bcmAllowed -eq 1 ] && sed -i 's/CONFIG_BCM_OPEN=y/# CONFIG_BCM_OPEN is not set/g' .config
[ $iceAllowed -eq 1 ] && echo "# CONFIG_ICE_OPEN is not set" >> .config || echo "CONFIG_ICE_OPEN=y" >> .config
[ $endptAllowed -eq 1 ] && echo "# CONFIG_ENDPT_OPEN is not set" >> .config || echo "CONFIG_ENDPT_OPEN=y" >> .config
[ $natalieAllowed -eq 1 ] && echo "# CONFIG_NATALIE_OPEN is not set" >> .config || 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
# 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 '"')
@@ -249,8 +245,10 @@ function genconfig {
esac
shift;
done
[ -d $TMPDIR ] || mkdir $TMPDIR
setup_dirs
create_and_copy_files "$1" "$2"
[ -d $TMPDIR ] && rm -rf $TMPDIR
use_local_mirror
fi
}

View File

@@ -60,7 +60,7 @@ build_ice_consumer() {
icerelease=$(grep -w "PKG_RELEASE:" ./feeds/feed_inteno_packages/ice-client/Makefile | cut -d'=' -f2)
iceversion=$icebasever$icerelease
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-*
cd ./build_dir/target-*_uClibc-0.9.33.*/ice-client-$icebasever/ipkg-brcm*
tar -czv ice-client -f ice-client-$profile-$iceversion-$icecommith.tar.gz
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/

View File

@@ -1,70 +0,0 @@
# this is a developer helper script to SCP changed files to remote host
ROOT=build_dir/target-mips_uClibc-0.9.33.2/root-iopsys-brcm63xx-mips/
ROOT_OLD=tmp/root_old/
ROOT_TMP=tmp/root_tmp/
function scp_changes_reset {
{ cd `dirname $0`
rm -rf "$ROOT_OLD"
mkdir -p "$ROOT_OLD"
cp -a "$ROOT"* "$ROOT_OLD"
}
}
function scp_changes {
if [ -z "$1" ] ; then
echo "usage: $0 scp_changes <host/-r(eset)/-p(retend)>"
echo "Error: host required"
exit 1
fi
{ cd `dirname $0`
if [ ! -d $ROOT ]; then
echo "$ROOT does not exist"
echo "please build the project first"
exit 1;
fi
if [ "$1" = "-r" ]; then
echo "reset changes"
scp_changes_reset
exit 0
fi
if [ ! -d $ROOT_OLD ]; then
echo "$ROOT_OLD does not exist"
echo "you didn't store state of previous buildroot"
#echo "please run ./scp_changes_reset.sh"
echo "doing it now"
scp_changes_reset
exit 1;
fi
FILES=`diff -rq "$ROOT" "$ROOT_OLD" 2>&1 | sed -ne "s?^Files .* and $ROOT_OLD\\(.*\\) differ?\\1?p" -ne "s?^Only in $ROOT\\(.*\\): \\(.*\\)?\\1/\\2?p"`
if [ "$1" = "-p" ]; then
echo "files that would be copied:"
echo $FILES
exit 0
fi
for f in $FILES
do
mkdir -p "$ROOT_TMP`dirname $f`"
cp -af "$ROOT$f" "$ROOT_TMP$f"
done
if [ -d "$ROOT_TMP" ]; then
echo "scp changed files to $1"
pushd "$ROOT_TMP" 2>&1 >/dev/null
scp -r * root@$1:/
RETVAL=$?
popd 2>&1 >/dev/null
rm -rf "$ROOT_TMP"
if [ "$RETVAL" -eq 0 ]; then
scp_changes_reset
else
echo "scp error"
exit $RETVAL
fi
else
echo "no change"
fi
}
}
register_command "scp_changes" "<host/-r(eset)/-p(retend)> SCP only changed files to device"

175
iop/scripts/setup_host.sh Executable file
View File

@@ -0,0 +1,175 @@
#!/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_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
read -p "Do you approve insallation of these packages (y/n): " ans
if [ "$ans" == "y" ]; then
apt-get install $packages_all
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"

View File

@@ -1,17 +0,0 @@
# this is a developer helper script to install the public ssh key on host running dropbear
function ssh_install_key {
if [ -e ~/.ssh/id_rsa.pub ]; then
echo "Adding public RSA key to $1"
KEY=`cat ~/.ssh/id_rsa.pub`
elif [ -e ~/.ssh/id_dsa.pub ]; then
echo "Adding public DSA key to $1"
KEY=`cat ~/.ssh/id_dsa.pub`
else
echo "No public key found"
exit 1
fi
ssh root@$1 "echo '$KEY' >> /etc/dropbear/authorized_keys" && echo ok
}
register_command "ssh_install_key" "Install the users public ssh key on host running dropbear"

View File

@@ -1,56 +0,0 @@
# this is a developer helper script to install firmware on a remote host with SSH
function usage {
echo "usage: $0 ssh_sysupgrade <host> <file> [opts]"
}
function ssh_sysupgrade {
if [ -z "$1" ] ; then
usage
echo "Error: host required"
exit 1
fi
if [ -z "$2" ] ; then
usage
echo "Error: firmware filename required"
exit 1
fi
if [ ! -e $2 ] ; then
usage
echo "Error: firmware file does not exist"
exit 1
fi
IMAGE=`basename $2`
echo "sysupgrade host: $1 with file $IMAGE"
[ "$2" ] && [ -e "$2" ] && scp $2 root@$1:/tmp/ && ssh root@$1 "sysupgrade $3 /tmp/$IMAGE" && echo "sysupgrade done!"
}
register_command "ssh_sysupgrade" "<host> <file> [opts] Install firmware on remote host with SSH"
function ssh_sysupgrade_latest {
if [ -z "$1" ] ; then
echo "usage: $0 ssh_sysupgrade_latest <host> [opts]"
echo "Error: host required"
exit 1
fi
{ cd `dirname $0`
IMAGE=`ls -Art bin/*/*.y | tail -n1`
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop ssh_sysupgrade $1 $IMAGE $2
}
}
register_command "ssh_sysupgrade_latest" "<host> [opts] Install latest ubifs firmware on remote host with SSH"
function ssh_sysupgrade_latest_w {
if [ -z "$1" ] ; then
echo "usage: $0 ssh_sysupgrade_latest_w <host> [opts]"
echo "Error: host required"
exit 1
fi
{ cd `dirname $0`
IMAGE=`ls -Art bin/*/*.w | tail -n1`
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop ssh_sysupgrade $1 $IMAGE $2
}
}
register_command "ssh_sysupgrade_latest_w" "<host> [opts] Install latest jffs2 firmware on remote host with SSH"

View File

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

View File

@@ -48,35 +48,32 @@ init_iup() {
config_get starttime polling starttime
### Ask for IUP related DHCP options only if IUP is enabled ###
new_reqopts() {
local net=$1
local enabled
local newreqopts=
local baseopts=
local reqopts="$(uci -q get network.$net.reqopts)"
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) ;;
*) baseopts="$baseopts $ropt" ;;
esac
done
ropt=""
reqopts="$baseopts $iupopts"
for ropt in $reqopts; do
case $ropt in
66|67|128|224) [ $enabled == "on" ] && newreqopts="$newreqopts $ropt" ;;
*) newreqopts="$newreqopts $ropt" ;;
esac
done
local enabled
local newreqopts=
local baseopts=
local reqopts="$(uci -q get network.wan.reqopts)"
local iupopts="66 67 128 224"
local ropt iopt
local net
config_get enabled iup enabled "on"
for ropt in $reqopts; do
case $ropt in
66|67|128|224) ;;
*) baseopts="$baseopts $ropt" ;;
esac
done
ropt=""
reqopts="$baseopts $iupopts"
for ropt in $reqopts; do
case $ropt in
66|67|128|224) [ $enabled == "on" ] && newreqopts="$newreqopts $ropt" ;;
*) newreqopts="$newreqopts $ropt" ;;
esac
done
newreqopts="$(echo $newreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
echo "$newreqopts"
}
newreqopts="$(echo $newreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
for net in $(management_interfaces); do
uci -q set network.$net.reqopts="$(new_reqopts $net)"
uci -q set network.$net.reqopts="$newreqopts"
done
uci commit network
ubus call network reload

View File

@@ -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
@@ -55,8 +52,8 @@ 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 ()
@@ -234,141 +231,10 @@ handle_Downloaded_file()
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 #
# extract device name.
network_get_device base_dev $3
# bring down old interface/device.
ifdown "${base_dev}"
logger -t dhcp_opt132 "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
logger -t dhcp_opt132 "committed update to file layer2_interface_vlan"
# reload configuration files.
/etc/init.d/layer2_interface_vlan reload
logger -t dhcp_opt132 "reload layer2_interface_vlan config"
# replace old interface (like eth0.1 with new eth0.101).
wan_if=$(uci get network.$3.ifname)
logger -t dhcp_opt132 "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.
;;
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
logger -t dhcp_opt132 "committed update to file network: ifname=${new_wan_if}"
# reboot into new if configuration.
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
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"
return 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 &
return 1
else
echo "Will not update software, already up to date"
return 0
fi
fi
}
### MAIN ###
###main
while [ -n "$1" ]; do
case "$1" in
-v) export VERBOSE="$(($VERBOSE + 1))";;
-q) export VERBOSE="$(($VERBOSE - 1))";;
-*)
@@ -380,65 +246,15 @@ while [ -n "$1" ]; do
shift;
done
# Process IUP related DHCP options #
if [ -n "$1" ]; then
local privopt224 vendorspecinf httpurl128
local tftp bootfile vlanid vlanpriority interface
json_load "$1"
json_get_var interface interface
json_get_var privopt224 privopt224
json_get_var vendorspecinf vendorspecinf
json_get_var httpurl128 httpurl128
json_get_var tftp tftp
json_get_var bootfile bootfile
json_get_var vlanid vlanid
json_get_var vlanpriority vlanpriority
if [ $privopt224 ]; then
echo "Option224 recived " $privopt224 > /dev/console
handle_option224 $privopt224
[ $? -eq 1 ] && exit
fi
if [ $vendorspecinf ]; then
url=${vendorspecinf%%,*}; rest=${vendorspecinf#*,}
provisioningcode=${rest%%,*};
uci_set_state provisioning iup url "$url"
uci_set_state provisioning iup provisioningcode "$provisioningcode"
elif [ $httpurl128 ]; then
uci_set_state provisioning iup urliup "$httpurl128"
elif [ $tftp ]; then
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
# if we get vlanid and maybe vlanpriority, configure for that.
if [ -n "$vlanid" -a -n "$vlanpriority" ]; then
logger -t dhcp_opt132 "vlanid: ${vlanid}, vlanpriority: ${vlanpriority}"
change_to_vlan ${vlanid} ${vlanpriority} ${interface}
elif [ -n "$vlanid" ]; then
logger -t dhcp_opt132 "vlanid: ${vlanid}"
change_to_vlan ${vlanid} 0 ${interface}
else
logger -t dhcp_opt132 "no vlanid given"
fi
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
@@ -447,7 +263,6 @@ else
v "No Provisioning Server Found"
exit
fi
config_load provisioning
config_foreach handle_provisioning subconfig "0"
config_get software uppgradeserver url
@@ -480,5 +295,4 @@ if [ "$reboot" == "on" ]; then
v "Reboot Signaled"
/sbin/reboot
fi
rm -rf /var/run/iup.pid

75
iup/files/sbin/iup224 Normal file
View File

@@ -0,0 +1,75 @@
#!/bin/sh
. /usr/share/libubox/jshn.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
sofwareminuspath=${url##*/}
if [ $url ] && [ $active -eq 1 ]; then
echo "Software version to download $sofwareminuspath"
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 "Image found $url will start flashing"
/sbin/sysupgrade -v $url
else
echo "Will not update software, already up to date"
fi
fi

View File

@@ -99,9 +99,9 @@ atm_inf_conf() {
checkxtmlist $atmtype $pcr $scr $mbs
ret="$?"
xtmctl operate conn --add 1.$vpi.$vci aal5 $encaps 0 1 $ret
xtmctl operate conn --addq 1.$vpi.$vci 0 wrr 1 # low priority queue
xtmctl operate conn --addq 1.$vpi.$vci 7 wrr 1 # high priority queue
xtmctl operate conn --add 1.$vpi.$vci aal5 $encaps 0 $ret $ret
xtmctl operate conn --addq 1.$vpi.$vci 0 wrr 1
xtmctl operate conn --addq 1.$vpi.$vci 7 wrr 1 # fixes pppoe disconnect issue
xtmctl operate conn --createnetdev 1.$vpi.$vci ${ifname%%.*}
xtmctl operate intf --state 1 enable

View File

@@ -1,105 +0,0 @@
#
# Copyright (C) 2016 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:=libcgroup
PKG_VERSION:=0.41
PKG_RELEASE:=1
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE_VERSION:=2186c97f60df7efe86ddadd5e3d9d36dd4923b98
PKG_SOURCE_URL:=git://git.code.sf.net/p/libcg/libcg
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)+git$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
#PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
# run install target when cross compiling. basically, make install DESTDIR=$(PKG_INSTALL_DIR)
# this way we don't need to pick out the resulting files from the build dir.
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libcgroup
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libpthread
TITLE:=Control group configuration library
URL:=https://sourceforge.net/p/libcg/
endef
define Package/libcgroup/description
Control groups, a new kernel feature in Linux 2.6.24 provides a file system
interface to manipulate and control the details on task grouping including
creation of new task groups (control groups), permission handling and task
assignment.
endef
define Package/libcgroup-daemon
SECTION:=base
CATEGORY:=Base system
DEPENDS:=+libcgroup +librt
TITLE:=Control group management daemon
URL:=https://sourceforge.net/p/libcg/
endef
define Package/libcgroup-utils
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libcgroup
TITLE:=Control group configuration utilities
URL:=https://sourceforge.net/p/libcg/
endef
#define Package/libcgroup/conffiles
# /etc/config/cgroups
#endef
CONFIGURE_ARGS += \
--disable-bindings \
--disable-pam \
--enable-static \
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/libcgroup
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libcgroup/*.h $(1)/usr/include/libcgroup/
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.* $(1)/usr/lib/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcgroup.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libcgroup/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.so* $(1)/usr/lib/
endef
define Package/libcgroup-daemon/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
# move to its own package?
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
$(INSTALL_CONF) ./files/cgroups.config $(1)/etc/config/cgroups
$(INSTALL_BIN) ./files/cgroups.init $(1)/etc/init.d/cgroups
endef
define Package/libcgroup-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
endef
$(eval $(call BuildPackage,libcgroup))
$(eval $(call BuildPackage,libcgroup-daemon))
$(eval $(call BuildPackage,libcgroup-utils))

View File

@@ -1,40 +0,0 @@
config cgroups cgroups
option enabled 1
option defgroup iopsys/normal
config cgroup _root_
list option memory.move_charge_at_immigrate=1
config cgroup iopsys
list option cpu.shares=4096
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup iopsys_normal
list option cpu.shares=1024
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup iopsys_high
list option cpu.shares=4096
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup 3prt
list option cpu.shares=1024
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config cgroup 3prt_normal
list option cpu.shares=1024
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config cgroup 3prt_high
list option cpu.shares=4096
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config procmap procmap
list procmap minidlna=3prt/normal

View File

@@ -1,123 +0,0 @@
#!/bin/sh /etc/rc.common
START=01
USE_PROCD=1
#PROCD_DEBUG=1
NAME=cgrulesengd
CGBASEDIR=/sys/fs/cgroup
CGCONFIG="cgroups"
CGRULESCONF=/tmp/cgrules.conf
CGCONFIGCONF=/tmp/cgconfig.conf
cgroupinit_add_knob_val_to_list () {
CG_KNOB_VAL_LIST="$CG_KNOB_VAL_LIST
$1"
}
cgroupinit_create_group () {
local cgrp=$1
local dir curr
if [ "$cgrp" == "_root_" ]; then
dir=.
else
dir=$(echo $cgrp |tr '_' '/')
fi
echo -e "group $dir {" >> $CGCONFIGCONF
CG_KNOB_VAL_LIST=
config_list_foreach $cgrp option cgroupinit_add_knob_val_to_list
CG_KNOB_VAL_LIST=$(echo "$CG_KNOB_VAL_LIST" |sort)
curr="_none_"
for knob_val in $CG_KNOB_VAL_LIST ; do
local ctrlr knob val
knob=$(echo $knob_val |awk -F= '{print $1}')
ctrlr=$(echo $knob |awk -F. '{print $1}')
val=$(echo $knob_val |awk -F= '{print $2}')
if [ "$curr" != "$ctrlr" ]; then
[ "$curr" == "_none_" ] || echo -e "\t}" >> $CGCONFIGCONF
curr=$ctrlr
echo -e "\t$curr {" >> $CGCONFIGCONF
fi
echo -e "\t\t$knob = \"$val\";" >> $CGCONFIGCONF
done
[ "$curr" == "_none_" ] || echo -e "\t}" >> $CGCONFIGCONF
echo -e "}\n" >> $CGCONFIGCONF
}
cgroupinit_add_to_rules () {
local name_grp=$1
local name grp
name=$(echo $name_grp |awk -F= '{print $1}')
grp=$(echo $name_grp |awk -F= '{print $2}')
echo -e "*:$name\t*\t$grp" >> $CGRULESCONF
}
cgroupinit_generate_config () {
local enab defgrp
config_load $CGCONFIG
config_get enab cgroups enabled "1"
[ $enab -eq 0 ] && return 1
config_get defgrp cgroups defgroup "_undef_"
[ "$defgrp" == "_undef_" ] && return 1
# mount here instead of in cgconfigparser to get all options right
# mounting without any controllers listed means mount all available
if ! grep -q " $CGBASEDIR cgroup " /proc/mounts; then
mount -t cgroup -o nodev,noexec,nosuid cgroup $CGBASEDIR
[ $? -eq 0 ] || return 1
fi
echo -n '' > $CGCONFIGCONF
config_foreach cgroupinit_create_group cgroup
echo -n '' > $CGRULESCONF
config_list_foreach procmap procmap cgroupinit_add_to_rules
echo -e "*\t*\t$defgrp" >> $CGRULESCONF
return 0
}
# cgrulesengd has hardcoded paths for configuration files
# use symlinks to point to generated config files
cgroupinit_cgrulesengd_fixup () {
[ -r /etc/cgrules.conf ] || ln -s $CGRULESCONF /etc/cgrules.conf
[ -r /etc/cgconfig.conf ] || ln -s $CGCONFIGCONF /etc/cgconfig.conf
[ -d /etc/cgconfig.d ] || mkdir /etc/cgconfig.d
}
start_service () {
cgroupinit_generate_config
[ $? -eq 0 ] || return
cgroupinit_cgrulesengd_fixup
/usr/sbin/cgconfigparser -l $CGCONFIGCONF || return
procd_open_instance
procd_set_param command /usr/sbin/cgrulesengd --nodaemon --syslog
procd_set_param respawn
procd_close_instance
}
stop_service () {
/usr/sbin/cgclear
}
service_triggers() {
procd_add_reload_trigger $CGCONFIG
}

View File

@@ -12,7 +12,7 @@ PKG_NAME:=peripheral_manager
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=2a16b98543580d376d5862a34415f24d8be15b27
PKG_SOURCE_VERSION:=bc5b8227410dac75d2525ef1946b842766982830
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se/peripheral_manager

View File

@@ -15,9 +15,8 @@ start_service() {
}
service_running() {
ubus -t 2 wait_for led.status
ubus -t 2 wait_for leds
ubus call led.status set '{"state":"ok"}'
ubus -t 2 wait_for button
}
stop() {

View File

@@ -6,9 +6,9 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=3.1.7
PKG_VERSION:=3.1.0
PKG_SOURCE_VERSION:=6ad4d1ec64e17889ef5be674329234f948137837
PKG_SOURCE_VERSION:=17c891b668f3149b4a6572f6848eee7e70677758
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/questd
@@ -18,21 +18,16 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
QUESTD_CLFAGS:=-DIOPSYS_BROADCOM
KERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
QUESTD_CLFAGS:=-DIOPSYS_BROADCOM
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
QUESTD_CLFAGS:=-DIOPSYS_MARVELL
else ifeq ($(CONFIG_TARGET_lantiq_xrx500),y)
QUESTD_CLFAGS:=-DIOPSYS_LANTIQ
else
$(info (UNEXPECTED CONFIG TARGET))
endif
LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib
export KERNEL_DIR
export QUESTD_CLFAGS
ifeq ($(CONFIG_PACKAGE_bcmkernel),y)
BCMKERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
else
BCMKERNEL_DIR:=$(BUILD_DIR)/bcmopen-consumer/bcm963xx
endif
export BCMKERNEL_DIR
define Package/questd
CATEGORY:=Utilities
@@ -48,9 +43,10 @@ endef
define Package/questd/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/tmp
$(INSTALL_BIN) $(PKG_BUILD_DIR)/questd $(1)/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ueventd $(1)/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uscriptd $(1)/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wificontrol $(1)/sbin/
endef
$(eval $(call BuildPackage,questd))

View File

@@ -16,11 +16,17 @@ start_service() {
procd_set_param command "/sbin/uscriptd"
procd_set_param respawn
procd_close_instance
procd_open_instance
procd_set_param command "/sbin/ueventd"
procd_set_param respawn
procd_close_instance
}
stop() {
service_stop /sbin/questd
service_stop /sbin/uscriptd
service_stop /sbin/ueventd
}
service_triggers()

View File

@@ -0,0 +1,5 @@
igmp snooping 2 proxy 1 lan2lan-snooping 0/0, rate-limit 0pps, priority -1
bridge device src-dev #tags lan-tci wan-tci group mode RxGroup source reporter timeout Index ExcludPt
br-lan eth5 eth2.1 00 0x0000 0xffffffff 0xe0027ffe EX 0xe0027ffe 0x00000000 0xc0a801f1 258 0x401e0001 -1
br-lan eth5 eth2.1 00 0x0000 0xffffffff 0xefc3ffff EX 0xefc3ffff 0x00000000 0xc0a801f1 258 0x400e0001 -1
br-lan eth5 eth2.1 00 0x0000 0xffffffff 0xefffffff EX 0xefffffff 0x00000000 0xc0a801f1 258 0x40070001 -1

View File

@@ -1,23 +0,0 @@
config SAMBA3_CONFIG_DEBUG
bool "Enable Logging for samba3"
depends on PACKAGE_samba3
default n
help
Enables debugging support (will make binaries *much* bigger)
Also increases MAX_DEBUG_LEVEL to get more messages (also increases binary sizes!)
config SAMBA3_CONFIG_SMALLER
bool "Make samba3 even smaller"
depends on PACKAGE_samba3
default y
help
Removes support for ???
Saves about 18kB for smbd, about 16kB for nmbd and about 17kB for smbpasswd
config SAMBA3_CONFIG_NO_PRINTING
bool "Remove shared printing support"
depends on PACKAGE_samba3
default y
help
Removes shared printing support.
Saves about 18kB for smbd, about 15kB for nmbd and about 18kB for smbpasswd

View File

@@ -1,146 +0,0 @@
#
# Copyright (C) 2008-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=samba3
PKG_VERSION:=3.0.37
PKG_RELEASE:=1
PKG_MD5SUM:=11ed2bfef4090bd5736b194b43f67289
PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions/
PKG_SOURCE:=samba-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/samba-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
#PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/samba3/Default
SECTION:=net
CATEGORY:=Network
SUBMENU:=Filesystem
URL:=http://www.samba.org/
endef
define Package/samba3
$(call Package/samba3/Default)
TITLE:=SMB server for file and printer sharing
DEPENDS:=+libpthread +libpopt $(ICONV_DEPENDS) +libattr
endef
define Package/samba3-nmbd
$(call Package/samba3/Default)
TITLE:=NetBIOS name server
DEPENDS:=+samba3
endef
define Package/samba3-mountcifs
$(call Package/samba3/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Mount utility for samba shares
endef
define Package/samba3/description
SMB server for file and printer sharing
Also contains a SMB password utility (smbpasswd)
Made small with patches taken from AVM GPL releases and freetz
endef
define Package/samba3-nmbd/description
NetBIOS name server
Made small with patches taken from AVM GPL releases and freetz
endef
define Package/cifsmount/description
An user space helper utility for mounting remote CIFS shares.
endef
define Package/samba3/conffiles
/etc/config/samba
/etc/samba/smb.conf.template
endef
define Package/samba3/config
source "$(SOURCE)/Config.in"
endef
TARGET_CFLAGS+=$(if $(CONFIG_SAMBA3_CONFIG_DEBUG),-DSAMBA_DEBUG,-DMAX_DEBUG_LEVEL=2)
TARGET_CFLAGS+=$(if $(CONFIG_SAMBA3_CONFIG_SMALLER),-DAVM_SMALLER)
TARGET_CFLAGS+=$(if $(CONFIG_SAMBA3_CONFIG_NO_PRINTING),-DAVM_NO_PRINTING)
CONFIGURE_PATH:=source
CONFIGURE_ARGS+= \
$(if $(CONFIG_SAMBA3_CONFIG_DEBUG),--enable-debug) \
--without-krb5 \
--without-ads \
--without-ldap \
--enable-largefile \
--with-configdir=/etc/samba \
--with-libiconv=$(ICONV_PREFIX) \
--with-privatedir=/etc/samba
# Make sure we tell the configure script that we support negative enum values and want to use setresuid
CONFIGURE_VARS+= \
SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes \
samba_cv_USE_SETEUID=no \
samba_cv_have_setresuid=yes \
samba_cv_USE_SETRESUID=yes \
samba_cv_HAVE_C99_VSNPRINTF=yes \
samba_cv_have_longlong=yes \
ac_cv_type_long_long=yes \
MAKE_PATH=source
MAKE_FLAGS += \
$(if $(CONFIG_SAMBA3_CONFIG_NO_PRINTING),OWRT_NO_PRINTING=1) \
$(if $(CONFIG_SAMBA3_CONFIG_SMALLER),OWRT_SMALLER=1)
#define Build/Configure
# $(SH) pushd $(PKG_BUILD_DIR)/source && ./autogen.sh ; popd
# $(Build/Configure/Default)
#endef
define Build/Compile
# Ugly fix for parallel building (without this some generated files will be missing upon clean build)
$(call Build/Compile/Default, proto_exists)
$(call Build/Compile/Default, \
$(if $(CONFIG_PACKAGE_samba3),bin/smbd bin/smbpasswd) \
$(if $(CONFIG_PACKAGE_samba3-nmbd),bin/nmbd) \
$(if $(CONFIG_PACKAGE_samba3-mountcifs),bin/mount.cifs bin/umount.cifs) \
)
endef
define Package/samba3/install
$(INSTALL_DIR) $(1)/etc/{samba,init.d,config}
$(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
$(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba
$(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba/
touch $(1)/etc/samba/smbpasswd
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd $(1)/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbd $(1)/bin/
endef
define Package/samba3-nmbd/install
$(INSTALL_DIR) $(1)/etc/init.d
# $(INSTALL_BIN) ./files/samba-nmbd.init $(1)/etc/init.d/samba-nmbd
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/nmbd $(1)/bin/
endef
define Package/samba3-mountcifs/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/mount.cifs $(1)/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/umount.cifs $(1)/bin/
endef
$(eval $(call BuildPackage,samba3))
$(eval $(call BuildPackage,samba3-nmbd))
$(eval $(call BuildPackage,samba3-mountcifs))

View File

@@ -1,56 +0,0 @@
#undef HAVE_CREAT64
#define HAVE_CREAT64 1
#undef HAVE_FSEEKO64
#define HAVE_FSEEKO64 1
#undef HAVE_FSTAT64
#define HAVE_FSTAT64 1
#undef HAVE_FTELLO64
#define HAVE_FTELLO64 1
#undef HAVE_FTRUNCATE64
#define HAVE_FTRUNCATE64 1
#undef HAVE_LSEEK64
#define HAVE_LSEEK64 1
#undef HAVE_LSTAT64
#define HAVE_LSTAT64 1
#undef HAVE_OPEN64
#define HAVE_OPEN64 1
#undef HAVE_PREAD64
#define HAVE_PREAD64 1
#undef HAVE_PWRITE64
#define HAVE_PWRITE64 1
#undef HAVE_READDIR64
#define HAVE_READDIR64 1
#undef HAVE_STAT64
#define HAVE_STAT64 1
#undef HAVE_STRUCT_FLOCK64
#define HAVE_STRUCT_FLOCK64 1
#undef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
#undef SIZEOF_OFF_T
#define SIZEOF_OFF_T 8
#undef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#undef _GNU_SOURCE
#define _GNU_SOURCE 1
#undef _LARGEFILE_SOURCE
#define _LARGEFILE_SOURCE 1
#undef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE 1

View File

@@ -1,12 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2011 OpenWrt.org
START=61
start() {
service_start /bin/nmbd -D
}
stop() {
service_stop /bin/nmbd
}

View File

@@ -1,81 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2008-2011 OpenWrt.org
START=60
smb_header() {
local name
local workgroup
local description
local homes
local interface
config_get name $1 name
config_get workgroup $1 workgroup
config_get description $1 description
config_get homes $1 homes
config_get interface $1 interface "lan"
# resolve interfaces
local interfaces=$(
include /lib/network
scan_interfaces
local net ifname; for net in $interface; do
config_get ifname "$net" ifname "$net"
echo -n "$ifname "
done
)
[ -z "$name" ] && name=openwrt
[ -z "$workgroup" ] && workgroup=openwrt
[ -z "$description" ] && description=openwrt
mkdir -p /var/etc
cp /etc/samba/smb.conf.template /var/etc/smb.conf
[ -L /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
sed -i "s/|NAME|/$name/g" /var/etc/smb.conf
sed -i "s/|WORKGROUP|/$workgroup/g" /var/etc/smb.conf
sed -i "s/|DESCRIPTION|/$description/g" /var/etc/smb.conf
sed -i "s/|INTERFACES|/$interfaces/g" /var/etc/smb.conf
[ "$homes" == "1" ] && {
echo -e "\n[homes]\n\tcomment = Home Directories\n\tbrowseable = no\n\tread only = no\n\tcreate mode = 0750" >> /var/etc/smb.conf
}
}
smb_add_share() {
local name
local path
local users
local read_only
local guest_ok
local create_mask
local dir_mask
config_get name $1 name
config_get path $1 path
config_get users $1 users
config_get read_only $1 read_only
config_get guest_ok $1 guest_ok
config_get create_mask $1 create_mask
config_get dir_mask $1 dir_mask
[ -z "$name" -o -z "$path" ] && return
echo -e "\n[$name]\n\tpath = $path" >> /var/etc/smb.conf
[ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf
[ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/smb.conf
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/smb.conf
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/smb.conf
}
start() {
config_load samba
config_foreach smb_header samba
config_foreach smb_add_share sambashare
service_start /bin/smbd -D
}
stop() {
service_stop /bin/smbd
}

View File

@@ -1,7 +0,0 @@
config samba
option 'name' 'IntenoSMB'
option 'workgroup' 'IntenoSMB'
option 'description' 'IntenoSMB'
option 'homes' '0'
option 'interface' 'lan'

View File

@@ -1,168 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2008-2012 OpenWrt.org
START=60
STOP=40
USE_PROCD=1
useradd()
{
local user
local password
config_get user $1 user
config_get password $1 password
if ! $(grep -rq "^$user:" /etc/passwd) ; then
echo "adding user $user"
adduser $user -s /bin/false -D -H -h /mnt/$user -g "samba,pass=$password" && smbpasswd $user $password
else
tmp=$(grep -r "^$user:" /etc/passwd | cut -d":" -f5)
if $(echo $tmp | grep -rq "^samba") ; then
if [ "$tmp" != "samba,pass=$password" ] ; then
echo "change user $user"
deluser $user
adduser $user -s /bin/false -D -H -h /mnt/$user -g "samba,pass=$password" && smbpasswd $user $password
fi
else
echo "activating samba for system user $user"
smbpasswd $user $password
fi
fi
}
samba_user_exists()
{
local user
config_get user $1 user
[ "$user" == "$2" ] && echo "1" && break
}
purgepasswd()
{
for us in `grep -r "^.*:" /etc/samba/smbpasswd | cut -d":" -f1`; do
if [ -z "$(config_foreach samba_user_exists sambausers $us)" ] ; then
smbpasswd -del $us
grep -r "^$us:" /etc/passwd | cut -d":" -f5 | grep -rq "^samba" && deluser $us
fi
done
# delete left over samba users in case they were not in /etc/samba/smbpasswd
for us in `grep ":/mnt/" /etc/passwd | cut -d":" -f1`; do
deluser $us
done
}
smb_header() {
local interface
config_get interface $1 interface
# resolve interfaces
local interfaces=$(
. /lib/functions/network.sh
local net
for net in $interface; do
local device
network_get_device device "$net" && {
local subnet
network_get_subnet subnet "$net" && echo -n "$subnet "
network_get_subnet6 subnet "$net" && echo -n "$subnet "
}
echo -n "${device:-$net} "
done
)
local name workgroup description charset
local hostname="$(uci_get system.@system[0].hostname)"
config_get name $1 name "${hostname:-OpenWrt}"
config_get workgroup $1 workgroup "${hostname:-OpenWrt}"
config_get description $1 description "Samba on ${hostname:-OpenWrt}"
config_get charset $1 charset "UTF-8"
mkdir -p /var/etc
sed -e "s#|NAME|#$name#g" \
-e "s#|WORKGROUP|#$workgroup#g" \
-e "s#|DESCRIPTION|#$description#g" \
-e "s#|INTERFACES|#$interfaces#g" \
-e "s#|CHARSET|#$charset#g" \
/etc/samba/smb.conf.template > /var/etc/smb.conf
local homes
config_get_bool homes $1 homes 0
[ $homes -gt 0 ] && {
cat <<EOT >> /var/etc/smb.conf
[homes]
comment = Home Directories
browsable = no
read only = no
create mode = 0750
EOT
}
[ -L /etc/samba/smb.conf ] || $(rm -f /etc/samba/smb.conf; ln -nsf /var/etc/smb.conf /etc/samba/smb.conf)
}
smb_add_share() {
local name
local path
local users
local read_only
local guest_ok
local create_mask
local dir_mask
local browseable
local dirpath
config_get name $1 name
config_get path $1 path
config_get users $1 users
config_get read_only $1 read_only
config_get guest_ok $1 guest_ok
config_get create_mask $1 create_mask
config_get dir_mask $1 dir_mask
config_get browseable $1 browseable
config_get dirpath $1 dirpath
path="$path/$dirpath"
[ -z "$name" -o -z "$path" ] && return
echo -e "\n[$name]\n\tpath = $path" >> /var/etc/smb.conf
[ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf
[ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/smb.conf
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/smb.conf
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/smb.conf
[ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" >> /var/etc/smb.conf
}
start_service() {
config_load samba
purgepasswd
config_foreach useradd sambausers
config_foreach smb_header samba
config_foreach smb_add_share sambashare
procd_open_instance
procd_set_param command "/bin/smbd" -F
procd_close_instance
procd_open_instance
procd_set_param command "/bin/nmbd" -F
procd_close_instance
}
stop_service() {
service_stop /bin/smbd
service_stop /bin/nmbd
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger samba network
}

View File

@@ -1,19 +0,0 @@
[global]
netbios name = |NAME|
workgroup = |WORKGROUP|
server string = |DESCRIPTION|
syslog = 10
encrypt passwords = true
passdb backend = smbpasswd
obey pam restrictions = yes
socket options = TCP_NODELAY
unix charset = UTF-8
preferred master = yes
os level = 20
security = user
guest account = nobody
invalid users = root
smb passwd file = /etc/samba/smbpasswd
interfaces = |INTERFACES|
bind interfaces only = yes

File diff suppressed because it is too large Load Diff

View File

@@ -1,48 +0,0 @@
Index: samba-3.0.37/source/popt/popt.c
===================================================================
--- samba-3.0.37.orig/source/popt/popt.c 2011-04-11 23:35:04.000000000 +0200
+++ samba-3.0.37/source/popt/popt.c 2011-04-11 23:35:10.000000000 +0200
@@ -10,13 +10,14 @@
#include "system.h"
-#if HAVE_FLOAT_H
+//#if HAVE_FLOAT_H
#include <float.h>
-#endif
+//#endif
#include <math.h>
#include "findme.h"
#include "poptint.h"
+#include "../include/config.h"
#ifdef MYDEBUG
/*@unchecked@*/
@@ -388,7 +389,7 @@
sprintf(s, "%s/%s", con->execPath, item->argv[0]);
argv[argc] = s;
} else {
- argv[argc] = findProgramPath(item->argv[0]);
+ argv[argc] = ""/*findProgramPath(item->argv[0])*/;
}
if (argv[argc++] == NULL) return POPT_ERROR_NOARG;
@@ -1246,4 +1247,3 @@
return numargs;
}
-/*@=boundswrite@*/
Index: samba-3.0.37/source/modules/vfs_default.c
===================================================================
--- samba-3.0.37.orig/source/modules/vfs_default.c 2011-04-11 23:35:08.000000000 +0200
+++ samba-3.0.37/source/modules/vfs_default.c 2011-04-11 23:35:10.000000000 +0200
@@ -977,7 +977,7 @@
START_PROFILE(syscall_linux_setlease);
-#ifdef LINUX
+#if defined(LINUX) && defined(HAVE_KERNEL_OPLOCKS_LINUX)
/* first set the signal handler */
if(linux_set_lease_sighandler(fd) == -1)
return -1;

View File

@@ -1,39 +0,0 @@
Index: samba-3.0.37/source/Makefile.in
===================================================================
--- samba-3.0.37.orig/source/Makefile.in 2009-09-30 14:21:56.000000000 +0200
+++ samba-3.0.37/source/Makefile.in 2011-04-03 20:35:19.000000000 +0200
@@ -92,7 +92,7 @@
# or in smb.conf (see smb.conf(5))
LOGFILEBASE = @logfilebase@
CONFIGFILE = $(CONFIGDIR)/smb.conf
-LMHOSTSFILE = $(CONFIGDIR)/lmhosts
+LMHOSTSFILE = /etc/lmhosts
# This is where smbpasswd et al go
PRIVATEDIR = @privatedir@
Index: samba-3.0.37/source/configure
===================================================================
--- samba-3.0.37.orig/source/configure 2009-09-30 15:08:58.000000000 +0200
+++ samba-3.0.37/source/configure 2011-04-03 20:35:20.000000000 +0200
@@ -1536,8 +1536,8 @@
--with-fhs Use FHS-compliant paths (default=no)
--with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)
--with-rootsbindir=DIR Which directory to use for root sbin ($ac_default_prefix/sbin)
- --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)
- --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)
+ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/lock)
+ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/run)
--with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)
--with-configdir=DIR Where to put configuration files ($libdir)
--with-logfilebase=DIR Where to put log files ($VARDIR)
@@ -2295,8 +2295,8 @@
rootsbindir="\${SBINDIR}"
-lockdir="\${VARDIR}/locks"
-piddir="\${VARDIR}/locks"
+lockdir="\${VARDIR}/lock"
+piddir="\${VARDIR}/run"
test "${mandir}" || mandir="\${prefix}/man"
logfilebase="\${VARDIR}"
privatedir="\${prefix}/private"

View File

@@ -1,216 +0,0 @@
Index: samba-3.0.37/source/Makefile.in
===================================================================
--- samba-3.0.37.orig/source/Makefile.in 2011-08-08 23:40:18.004444730 +0200
+++ samba-3.0.37/source/Makefile.in 2011-08-08 23:40:19.054444730 +0200
@@ -538,10 +538,7 @@
PASSWD_UTIL_OBJ = utils/passwd_util.o
-SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSWD_UTIL_OBJ) $(PASSCHANGE_OBJ) \
- $(PARAM_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \
- $(GROUPDB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
- $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ)
+SMBPASSWD_OBJ = utils/owrt_smbpasswd.o lib/md4.o
PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) \
$(LIBSAMBA_OBJ) $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) \
Index: samba-3.0.37/source/utils/owrt_smbpasswd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ samba-3.0.37/source/utils/owrt_smbpasswd.c 2011-08-08 23:40:19.064444730 +0200
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) John Crispin <blogic@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 675
+ * Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "includes.h"
+#include <endian.h>
+
+void E_md4hash(const char *passwd, uchar p16[16])
+{
+ int len;
+ smb_ucs2_t wpwd[129];
+ int i;
+
+ len = strlen(passwd);
+ for (i = 0; i < len; i++) {
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ wpwd[i] = (unsigned char)passwd[i];
+#else
+ wpwd[i] = (unsigned char)passwd[i] << 8;
+#endif
+ }
+ wpwd[i] = 0;
+
+ len = len * sizeof(int16);
+ mdfour(p16, (unsigned char *)wpwd, len);
+ ZERO_STRUCT(wpwd);
+}
+
+/* returns -1 if user is not present in /etc/passwd*/
+int find_uid_for_user(char *user)
+{
+ char t[256];
+ FILE *fp = fopen("/etc/passwd", "r");
+ int ret = -1;
+
+ if(!fp)
+ {
+ printf("failed to open /etc/passwd");
+ goto out;
+ }
+
+ while(!feof(fp))
+ {
+ if(fgets(t, 255, fp))
+ {
+ char *p1, *p2;
+ p1 = strchr(t, ':');
+ if(p1 && (p1 - t == strlen(user)) && (strncmp(t, user, strlen(user))) == 0)
+ {
+ p1 = strchr(t, ':');
+ if(!p1)
+ goto out;
+ p2 = strchr(++p1, ':');
+ if(!p2)
+ goto out;
+ p1 = strchr(++p2, ':');
+ if(!p1)
+ goto out;
+ *p1 = '\0';
+ ret = atoi(p2);
+ goto out;
+ }
+ }
+ }
+ printf("No valid user found in /etc/passwd\n");
+
+out:
+ if(fp)
+ fclose(fp);
+ return ret;
+}
+
+void insert_user_in_smbpasswd(char *user, char *line)
+{
+ char t[256];
+ FILE *fp = fopen("/etc/samba/smbpasswd", "r+");
+
+ if(!fp)
+ {
+ printf("failed to open /etc/samba/smbpasswd");
+ goto out;
+ }
+
+ while(!feof(fp))
+ {
+ if(fgets(t, 255, fp))
+ {
+ char *p;
+ p = strchr(t, ':');
+ if(p && (p - t == strlen(user)) && (strncmp(t, user, strlen(user))) == 0)
+ {
+ fseek(fp, -strlen(line), SEEK_CUR);
+ break;
+ }
+ }
+ }
+
+ fprintf(fp, line);
+
+out:
+ if(fp)
+ fclose(fp);
+}
+
+void delete_user_from_smbpasswd(char *user)
+{
+ char t[256];
+ FILE *fp = fopen("/etc/samba/smbpasswd", "r+");
+
+ if(!fp)
+ {
+ printf("failed to open /etc/samba/smbpasswd");
+ goto out;
+ }
+
+ while(!feof(fp))
+ {
+ if(fgets(t, 255, fp))
+ {
+ char *p;
+ p = strchr(t, ':');
+ if(p && (p - t == strlen(user)) && (strncmp(t, user, strlen(user))) == 0)
+ {
+ fpos_t r_pos, w_pos;
+ char t2[256];
+ fgetpos(fp, &r_pos);
+ w_pos = r_pos;
+ w_pos.__pos -= strlen(t);
+ while(fgets(t2, 256, fp))
+ {
+ fsetpos(fp, &w_pos);
+ fputs(t2, fp);
+ r_pos.__pos += strlen(t2);
+ w_pos.__pos += strlen(t2);
+ fsetpos(fp, &r_pos);
+ }
+ ftruncate(fileno(fp), w_pos.__pos);
+ break;
+ }
+ }
+ }
+
+out:
+ if(fp)
+ fclose(fp);
+}
+
+int main(int argc, char **argv)
+{
+ unsigned uid;
+ uchar new_nt_p16[NT_HASH_LEN];
+ int g;
+ int smbpasswd_present;
+ char smbpasswd_line[256];
+ char *s;
+
+ if(argc != 3)
+ {
+ printf("usage for openwrt_smbpasswd - \n\t%s USERNAME PASSWD\n\t%s -del USERNAME\n", argv[0], argv[0]);
+ exit(1);
+ }
+ if(strcmp(argv[1], "-del") == 0)
+ {
+ printf("deleting user %s\n", argv[2]);
+ delete_user_from_smbpasswd(argv[2]);
+ return 0;
+ }
+ uid = find_uid_for_user(argv[1]);
+ if(uid == -1)
+ exit(2);
+
+ E_md4hash(argv[2], new_nt_p16);
+ s = smbpasswd_line;
+ s += snprintf(s, 256 - (s - smbpasswd_line), "%s:%u:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:", argv[1], uid);
+ for(g = 0; g < 16; g++)
+ s += snprintf(s, 256 - (s - smbpasswd_line), "%02X", new_nt_p16[g]);
+ snprintf(s, 256 - (s - smbpasswd_line), ":[U ]:LCT-00000001:\n");
+
+ insert_user_in_smbpasswd(argv[1], smbpasswd_line);
+
+ return 0;
+}

View File

@@ -1,15 +0,0 @@
Index: samba-3.0.24/source/lib/ms_fnmatch.c
===================================================================
--- samba-3.0.24.orig/source/lib/ms_fnmatch.c 2008-08-11 11:08:03.000000000 +0200
+++ samba-3.0.24/source/lib/ms_fnmatch.c 2008-08-11 11:11:33.000000000 +0200
@@ -153,6 +153,10 @@
int ret, count, i;
struct max_n *max_n = NULL;
+ if (strcmp(pattern, "*") == 0) {
+ return 0;
+ }
+
if (strcmp(string, "..") == 0) {
string = ".";
}

View File

@@ -1,13 +0,0 @@
Index: samba-3.0.24/source/lib/popt_common.c
===================================================================
--- samba-3.0.24.orig/source/lib/popt_common.c 2008-08-11 11:25:26.000000000 +0200
+++ samba-3.0.24/source/lib/popt_common.c 2008-08-11 11:26:03.000000000 +0200
@@ -54,7 +54,7 @@
else
pname++;
- pstr_sprintf(logfile, "%s/log.%s", arg, pname);
+ pstr_sprintf(logfile, "%s/log/%s.log", arg, pname);
lp_set_logfile(logfile);
}

View File

@@ -1,23 +0,0 @@
Index: samba-3.0.37/source/configure
===================================================================
--- samba-3.0.37.orig/source/configure 2011-04-03 20:35:20.000000000 +0200
+++ samba-3.0.37/source/configure 2011-04-03 20:36:51.000000000 +0200
@@ -22548,6 +22548,17 @@
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
+# Force disable RPC
+$as_echo "test=$ac_header" >&6
+if test "$ac_header" = "rpc/rpc.h"; then
+ if test "$ac_header_compiler" = "yes" -o "$ac_header_preproc" = "yes"; then
+ $as_echo "RPC support force disabled by OpenWRT patch" >&5
+ $as_echo "RPC support force disabled by OpenWRT patch" >&6
+ fi
+fi
+ac_header_compiler=no
+ac_header_preproc=no
+
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )

View File

@@ -1,28 +0,0 @@
Index: samba-3.0.37/source/configure.in
===================================================================
--- samba-3.0.37.orig/source/configure.in
+++ samba-3.0.37/source/configure.in
@@ -1389,23 +1389,6 @@ AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl
case "$host_os" in
*linux*)
# glibc <= 2.3.2 has a broken getgrouplist
- AC_TRY_RUN([
-#include <unistd.h>
-#include <sys/utsname.h>
-main() {
- /* glibc up to 2.3 has a broken getgrouplist */
-#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
- int libc_major = __GLIBC__;
- int libc_minor = __GLIBC_MINOR__;
-
- if (libc_major < 2)
- exit(1);
- if ((libc_major == 2) && (libc_minor <= 3))
- exit(1);
-#endif
- exit(0);
-}
-], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no])
if test x"$linux_getgrouplist_ok" = x"yes"; then
AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
fi

View File

@@ -1,12 +0,0 @@
Get rid of error due to cross compilation, as glibc version in OpenWRT is high enough
--- a/source/configure
+++ b/source/configure
@@ -37222,7 +37222,7 @@ rm -f core conftest.err conftest.$ac_obj
case "$host_os" in
*linux*)
# glibc <= 2.3.2 has a broken getgrouplist
- if test "$cross_compiling" = yes; then
+ if test "false" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling

View File

@@ -1,76 +0,0 @@
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -291,7 +291,7 @@ SECRETS_OBJ = passdb/secrets.o passdb/ma
LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
libsmb/namequery.o libsmb/conncache.o libads/dns.o
-LIBSAMBA_OBJ = libsmb/nterr.o libsmb/dcerpc_err.o libsmb/smbdes.o \
+LIBSAMBA_OBJ = libsmb/nterr.o $(if $(OWRT_SMALLER),,libsmb/dcerpc_err.o) libsmb/smbdes.o \
libsmb/smbencrypt.o libsmb/ntlm_check.o \
libsmb/ntlmssp.o libsmb/ntlmssp_parse.o libsmb/ntlmssp_sign.o
@@ -323,35 +323,35 @@ REGISTRY_OBJ = registry/reg_frontend.o r
registry/reg_db.o registry/reg_eventlog.o registry/reg_shares.o \
registry/reg_util.o registry/reg_dynamic.o registry/reg_perfcount.o
-RPC_LSA_OBJ = rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o
+RPC_LSA_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o)
-RPC_NETLOG_OBJ = rpc_server/srv_netlog.o rpc_server/srv_netlog_nt.o
+RPC_NETLOG_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_netlog.o rpc_server/srv_netlog_nt.o)
-RPC_SAMR_OBJ = rpc_server/srv_samr.o rpc_server/srv_samr_nt.o \
- rpc_server/srv_samr_util.o
+RPC_SAMR_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_samr.o rpc_server/srv_samr_nt.o \
+ rpc_server/srv_samr_util.o)
REGFIO_OBJ = registry/regfio.o
-RPC_REG_OBJ = rpc_server/srv_reg.o rpc_server/srv_reg_nt.o $(REGFIO_OBJ)
+RPC_REG_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_reg.o rpc_server/srv_reg_nt.o $(REGFIO_OBJ))
-RPC_LSA_DS_OBJ = rpc_server/srv_lsa_ds.o rpc_server/srv_lsa_ds_nt.o
+RPC_LSA_DS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_lsa_ds.o rpc_server/srv_lsa_ds_nt.o)
RPC_SVC_OBJ = rpc_server/srv_srvsvc.o rpc_server/srv_srvsvc_nt.o
RPC_WKS_OBJ = librpc/gen_ndr/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o
-RPC_SVCCTL_OBJ = rpc_server/srv_svcctl.o rpc_server/srv_svcctl_nt.o \
+RPC_SVCCTL_OBJ = $(if $(OWRT_SMALLER),, rpc_server/srv_svcctl.o) rpc_server/srv_svcctl_nt.o \
services/svc_spoolss.o services/svc_rcinit.o services/services_db.o \
services/svc_netlogon.o services/svc_winreg.o \
services/svc_wins.o
-RPC_NTSVCS_OBJ = rpc_server/srv_ntsvcs.o rpc_server/srv_ntsvcs_nt.o
+RPC_NTSVCS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_ntsvcs.o rpc_server/srv_ntsvcs_nt.o)
-RPC_DFS_OBJ = rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o
+RPC_DFS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o)
-RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o
+RPC_SPOOLSS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o)
-RPC_EVENTLOG_OBJ = rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o rpc_server/srv_eventlog_lib.o
+RPC_EVENTLOG_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o rpc_server/srv_eventlog_lib.o)
RPC_PIPE_OBJ = rpc_server/srv_pipe_hnd.o \
rpc_server/srv_pipe.o rpc_server/srv_lsa_hnd.o
@@ -431,7 +431,7 @@ PLAINTEXT_AUTH_OBJ = auth/pampass.o auth
SLCACHE_OBJ = libsmb/samlogon_cache.o
-DCUTIL_OBJ = libsmb/namequery_dc.o libsmb/trustdom_cache.o libsmb/trusts_util.o
+DCUTIL_OBJ = libsmb/namequery_dc.o $(if $(OWRT_SMALLER),,libsmb/trustdom_cache.o libsmb/trusts_util.o)
AUTH_BUILTIN_OBJ = auth/auth_builtin.o
AUTH_DOMAIN_OBJ = auth/auth_domain.o
@@ -468,7 +468,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpass
smbd/change_trust_pw.o smbd/fake_file.o \
smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \
$(AFS_SETTOKEN_OBJ) smbd/aio.o smbd/statvfs.o \
- smbd/dmapi.o $(MANGLE_OBJ) @VFS_STATIC@
+ $(if $(OWRT_SMALLER),,smbd/dmapi.o) $(MANGLE_OBJ) @VFS_STATIC@
SMBD_OBJ_BASE = $(PARAM_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \
$(RPC_SERVER_OBJ) $(RPC_PARSE_OBJ) $(SECRETS_OBJ) \

View File

@@ -1,47 +0,0 @@
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -319,7 +319,7 @@ LIBMSRPC_GEN_OBJ = librpc/gen_ndr/cli_wk
REGOBJS_OBJ = registry/reg_objects.o
-REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o registry/reg_printing.o \
+REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o $(if $(OWRT_NO_PRINTING),,registry/reg_printing.o) \
registry/reg_db.o registry/reg_eventlog.o registry/reg_shares.o \
registry/reg_util.o registry/reg_dynamic.o registry/reg_perfcount.o
@@ -349,7 +349,7 @@ RPC_NTSVCS_OBJ = $(if $(OWRT_SMALLER),,r
RPC_DFS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o)
-RPC_SPOOLSS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o)
+RPC_SPOOLSS_OBJ = $(if $(OWRT_NO_PRINTING),,rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o)
RPC_EVENTLOG_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o rpc_server/srv_eventlog_lib.o)
@@ -463,7 +463,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpass
smbd/vfs.o smbd/statcache.o \
smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \
smbd/process.o smbd/service.o smbd/error.o \
- printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \
+ $(if $(OWRT_NO_PRINTING),,printing/printfsp.o) lib/sysquotas.o lib/sysquotas_linux.o \
lib/sysquotas_xfs.o lib/sysquotas_4A.o \
smbd/change_trust_pw.o smbd/fake_file.o \
smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \
@@ -480,13 +480,13 @@ SMBD_OBJ_BASE = $(PARAM_OBJ) $(SMBD_OBJ_
$(REGISTRY_OBJ) $(POPT_LIB_OBJ) \
$(BUILDOPT_OBJ) $(SMBLDAP_OBJ)
-PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \
+PRINTING_OBJ = $(if $(OWRT_NO_PRINTING),,printing/pcap.o printing/print_svid.o printing/print_aix.o \
printing/print_cups.o printing/print_generic.o \
printing/lpq_parse.o printing/load.o \
- printing/print_iprint.o printing/print_test.o
+ printing/print_iprint.o printing/print_test.o)
-PRINTBASE_OBJ = printing/notify.o printing/printing_db.o
-PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o $(PRINTBASE_OBJ)
+PRINTBASE_OBJ = $(if $(OWRT_NO_PRINTING),,printing/notify.o printing/printing_db.o)
+PRINTBACKEND_OBJ = $(if $(OWRT_NO_PRINTING),,printing/printing.o printing/nt_printing.o $(PRINTBASE_OBJ))
SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN)
NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \

View File

@@ -1,54 +0,0 @@
#
# Copyright (C) 2016 Inteno
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk
PKG_NAME:=uci-diff
PKG_VERSION:=1
PKG_SOURCE_VERSION:=aed64062ac44010b6d7335a248c7cdeb922bea13
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@private.inteno.se:uci-diff
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib
define Package/uci-diff
CATEGORY:=Utilities
DEPENDS:=+libuci +libubox +ubus +libjson-c +libblobmsg-json
TITLE:=uci-diff
endef
define Package/uci-diff/description
uci-diff
endef
define Package/uci-diff/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uci-diff $(1)/sbin/
endef
#define Host/Compile
# $(MAKE) -C $(HOST_BUILD_DIR) CC="$(HOSTCC)" all
#endef
define Host/Install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(HOST_BUILD_DIR)/uci-diff $(STAGING_DIR_HOST)/bin/uci-diff
endef
$(eval $(call BuildPackage,uci-diff))
$(eval $(call HostBuild))

View File

@@ -1,43 +0,0 @@
{"wireless": {
"wifi-device": {
"type": "broadcom",
"country": "EU/13",
"band": "a",
"bandwidth": "80",
"hwmode": "11ac",
"channel": "auto",
"scantimer": "0",
"wmm": "1",
"wmm_noack": "0",
"wmm_apsd": "1",
"txpower": "100",
"rateset": "default",
"frag": "2346",
"rts": "2347",
"dtim_period": "1",
"beacon_int": "100",
"rxchainps": "0",
"rxchainps_qt": "10",
"rxchainps_pps": "10",
"rifs": "0",
"rifs_advert": "0",
"maxassoc": "32",
"doth": "1",
"dfsc": "1",
"disabled": "1"
},
"wifi-iface": {
"device": "wl0",
"network": "lan",
"mode": "ap",
"ssid": "Inteno-4BC8",
"encryption": "mixed-psk",
"cipher": "auto",
"key": "1234567890",
"gtk_rekey": "3600",
"macfilter": "0",
"wps_pbc": "1",
"wmf_bss_enable": "1",
"bss_max": "16"
}
}}

View File

@@ -1,22 +0,0 @@
{"wireless": {
"wl0": {
".name": "wl0",
".type": "wifi-device",
"channel": 100
},
"wl1": {
".name": "wl1",
".type": "wifi-device",
"wmm": 0
},
"wi0-0": {
".type": "wifi-iface",
"device": "wi0-0",
"ssid": "Fredrik"
},
"wi1-0": {
".type": "wifi-iface",
"device": "wi1-0",
"ssid": "blah"
}
}}

View File

@@ -1268,7 +1268,7 @@ get_call_filter()
fi
local call_filter enabled
config_get call_filter $provider call_filter "call_filter0"
config_get call_filter $provider call_filter
if ! [ -z "$call_filter" -o "$call_filter" == "-" ] ; then
macro="Macro($call_filter-$direction)"
fi

View File

@@ -20,7 +20,7 @@ uci -q batch <<-EOT
add voice_client ringing_status
rename voice_client.@ringing_status[-1]=RINGING_STATUS
set voice_client.RINGING_STATUS.status=0
set voice_client.RINGING_STATUS.enabled=0
set voice_client.RINGING_STATUS.enabled=1
set voice_client.RINGING_STATUS.shouldring=1
commit voice_client
EOT