mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
Merge remote-tracking branch 'origin/from-iop-3.4' into v3.5
This commit is contained in:
commit
67bf9c7cc6
42 changed files with 8438 additions and 53 deletions
|
|
@ -16,7 +16,7 @@ PKG_RELEASE:=1
|
||||||
PKG_SOURCE_URL:=git@iopsys.inteno.se:bcmkernel
|
PKG_SOURCE_URL:=git@iopsys.inteno.se:bcmkernel
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
|
||||||
PKG_SOURCE_VERSION:=35a8fed1103e8afe104cfe35e4461b010575521e
|
PKG_SOURCE_VERSION:=5bcd89500860fe7253cf5ca5a856dea626dc33a4
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_SDK_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_SDK_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
@ -180,6 +180,8 @@ define Package/bcmkernel/install
|
||||||
rm -f $(1)/usr/sbin/racoon
|
rm -f $(1)/usr/sbin/racoon
|
||||||
rm -f $(1)/usr/sbin/ripd
|
rm -f $(1)/usr/sbin/ripd
|
||||||
rm -f $(1)/usr/sbin/send_cms_msg
|
rm -f $(1)/usr/sbin/send_cms_msg
|
||||||
|
rm -f $(1)/usr/sbin/smbd
|
||||||
|
rm -f $(1)/usr/sbin/smbpasswd
|
||||||
rm -f $(1)/usr/sbin/sshd
|
rm -f $(1)/usr/sbin/sshd
|
||||||
rm -f $(1)/usr/sbin/ssk
|
rm -f $(1)/usr/sbin/ssk
|
||||||
rm -f $(1)/usr/sbin/sqlite3
|
rm -f $(1)/usr/sbin/sqlite3
|
||||||
|
|
|
||||||
30
catv/Makefile
Normal file
30
catv/Makefile
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=catv
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/catv
|
||||||
|
CATEGORY:=Utilities
|
||||||
|
TITLE:=CATV
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/catv/description
|
||||||
|
CATV configuration utility
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
|
$(CP) ./files/* $(PKG_BUILD_DIR)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/catv/install
|
||||||
|
$(CP) ./files/* $(1)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,catv))
|
||||||
4
catv/files/etc/config/catv
Normal file
4
catv/files/etc/config/catv
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
config service 'catv'
|
||||||
|
option enable 'no'
|
||||||
|
option filter '3'
|
||||||
BIN
catv/files/etc/init.d/.catv.kate-swp
Normal file
BIN
catv/files/etc/init.d/.catv.kate-swp
Normal file
Binary file not shown.
26
catv/files/etc/init.d/catv
Executable file
26
catv/files/etc/init.d/catv
Executable file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
#
|
||||||
|
# Copyright (C) 2015 inteno.org
|
||||||
|
#
|
||||||
|
|
||||||
|
START=71
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
local enable=0
|
||||||
|
local filter=0
|
||||||
|
|
||||||
|
config_load catv
|
||||||
|
config_get enable catv enable
|
||||||
|
config_get filter catv filter
|
||||||
|
ubus call catv set-enable "{\"enable\":\"$enable\"}"
|
||||||
|
ubus call catv set-filter "{\"filter\":\"$filter\"}"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
service_triggers() {
|
||||||
|
procd_add_reload_trigger catv
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -16,14 +16,14 @@ export PLATFORM_INCLUDE:=platforms/iopsys/build.mk
|
||||||
export DATE:=$(shell date +%Y-%m-%d-%H-%M-%S)
|
export DATE:=$(shell date +%Y-%m-%d-%H-%M-%S)
|
||||||
export LOGIN:=$(shell whoami)
|
export LOGIN:=$(shell whoami)
|
||||||
BASE_PKG_VERSION:=3.4.0
|
BASE_PKG_VERSION:=3.4.0
|
||||||
PKG_RELEASE:=RC5
|
PKG_RELEASE:=RC6
|
||||||
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
|
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
|
||||||
export PKG_VERSION
|
export PKG_VERSION
|
||||||
|
|
||||||
###########################--RELEASE--################################
|
###########################--RELEASE--################################
|
||||||
|
|
||||||
PKG_SOURCE_URL:=ssh://git@iopsys.inteno.se/ice-client.git
|
PKG_SOURCE_URL:=ssh://git@iopsys.inteno.se/ice-client.git
|
||||||
PKG_SOURCE_VERSION:=3bdc4863e9b6343b92909b4cf9acb938c87efa21
|
PKG_SOURCE_VERSION:=e860a7697ac8d6029cd1f75e1df9885e1d4131f5
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BASE_PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BASE_PKG_VERSION)
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(BASE_PKG_VERSION)-$(PKG_RELEASE).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(BASE_PKG_VERSION)-$(PKG_RELEASE).tar.gz
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=icwmp
|
PKG_NAME:=icwmp
|
||||||
PKG_VERSION:=3.0-2015-11-23
|
PKG_VERSION:=3.0-2016-01-07
|
||||||
PKG_FIXUP:=autoreconf
|
PKG_FIXUP:=autoreconf
|
||||||
ifeq ($(CONFIG_BCM_OPEN),y)
|
ifeq ($(CONFIG_BCM_OPEN),y)
|
||||||
PKG_SOURCE_URL:=http://ihgsp.inteno.se/git/freecwmp.git
|
PKG_SOURCE_URL:=http://ihgsp.inteno.se/git/freecwmp.git
|
||||||
|
|
@ -16,7 +16,7 @@ else
|
||||||
PKG_SOURCE_URL:=ssh://git@iopsys.inteno.se/freecwmp.git
|
PKG_SOURCE_URL:=ssh://git@iopsys.inteno.se/freecwmp.git
|
||||||
endif
|
endif
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_VERSION:=e9e5f9f5f0c913fdc185f24aa9bca17e28155ab8
|
PKG_SOURCE_VERSION:=e00dd9b205a4763873fbdf059bc2d48d3d314955
|
||||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# iup at boot
|
# iup at boot
|
||||||
# Copyright (C) 2007 OpenWrt.org
|
# Copyright (C) 2007 OpenWrt.org
|
||||||
|
|
||||||
START=98
|
START=98
|
||||||
STOP=15
|
STOP=15
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
@ -46,7 +47,12 @@ init_iup() {
|
||||||
echo "$number $starttime * * $interval /sbin/iup > /dev/null 2>&1" >> $CRONPATH
|
echo "$number $starttime * * $interval /sbin/iup > /dev/null 2>&1" >> $CRONPATH
|
||||||
/etc/init.d/cron restart
|
/etc/init.d/cron restart
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boot() {
|
||||||
|
init_iup
|
||||||
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
init_iup
|
init_iup
|
||||||
|
|
||||||
|
|
@ -57,7 +63,15 @@ start_service() {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_service() {
|
stop_service() {
|
||||||
killall -9 /sbin/iup
|
if [ -f "/tmp/run/iup.pid" ]; then
|
||||||
|
kill -9 $(cat /tmp/run/iup.pid)
|
||||||
|
rm -rf /tmp/run/iup.pid
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
}
|
}
|
||||||
|
|
||||||
service_triggers() {
|
service_triggers() {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
echo $$ > /var/run/iup.pid
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /usr/share/libubox/jshn.sh
|
. /usr/share/libubox/jshn.sh
|
||||||
|
|
||||||
|
|
@ -272,6 +272,12 @@ if [ $software ]; then
|
||||||
local sysinfo=$(ubus call router quest "{ \"info\": \"system\" }")
|
local sysinfo=$(ubus call router quest "{ \"info\": \"system\" }")
|
||||||
json_load "$sysinfo"
|
json_load "$sysinfo"
|
||||||
json_get_var firmware firmware
|
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
|
if [ "$sofwareminuspath" == "${sofwareminuspath/$firmware/}" ] ; then
|
||||||
echo $software
|
echo $software
|
||||||
handle_provisioning uppgradeserver
|
handle_provisioning uppgradeserver
|
||||||
|
|
@ -288,3 +294,4 @@ if [ "$reboot" == "on" ]; then
|
||||||
v "Reboot Signaled"
|
v "Reboot Signaled"
|
||||||
/sbin/reboot
|
/sbin/reboot
|
||||||
fi
|
fi
|
||||||
|
rm -rf /var/run/iup.pid
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ boot() {
|
||||||
echo "ERROR: porttminit $interf failed!" > /dev/kmsg
|
echo "ERROR: porttminit $interf failed!" > /dev/kmsg
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
echo '1' > /proc/sys/net/ipv6/conf/$baseifname/disable_ipv6
|
||||||
ifconfig $baseifname up
|
ifconfig $baseifname up
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
26
libmicroxml/patches/0002-avoid-new-lines-in-attributes.patch
Normal file
26
libmicroxml/patches/0002-avoid-new-lines-in-attributes.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
--- a/mxml-file.c
|
||||||
|
+++ b/mxml-file.c
|
||||||
|
@@ -2782,7 +2782,7 @@ mxml_write_node(mxml_node_t *node, /* I - Node to write */
|
||||||
|
|
||||||
|
if (attr->value)
|
||||||
|
width += strlen(attr->value) + 3;
|
||||||
|
-
|
||||||
|
+#if 0
|
||||||
|
if (global->wrap > 0 && (col + width) > global->wrap)
|
||||||
|
{
|
||||||
|
if ((*putc_cb)('\n', p) < 0)
|
||||||
|
@@ -2792,11 +2792,14 @@ mxml_write_node(mxml_node_t *node, /* I - Node to write */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
+#endif
|
||||||
|
if ((*putc_cb)(' ', p) < 0)
|
||||||
|
return (-1);
|
||||||
|
|
||||||
|
col ++;
|
||||||
|
+#if 0
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
if (mxml_write_name(attr->name, p, putc_cb) < 0)
|
||||||
|
return (-1);
|
||||||
|
|
@ -46,7 +46,7 @@ mcpd_configure() {
|
||||||
|
|
||||||
for proxif in $igmp_proxy_interfaces; do
|
for proxif in $igmp_proxy_interfaces; do
|
||||||
json_load "$(ifstatus $proxif)"
|
json_load "$(ifstatus $proxif)"
|
||||||
json_get_var device device
|
json_get_var device l3_device
|
||||||
case "$device" in
|
case "$device" in
|
||||||
br-*)
|
br-*)
|
||||||
bridged=1
|
bridged=1
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,20 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=minidlna
|
PKG_NAME:=minidlna
|
||||||
PKG_VERSION:=1.1.3
|
PKG_VERSION:=1.1.4
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@SF/minidlna
|
PKG_SOURCE_URL:=@SF/minidlna
|
||||||
PKG_MD5SUM:=879027192c89e5376cdd2ae2d1aa33b4
|
PKG_MD5SUM:=67c9e91285bc3801fd91a5d26ea775d7
|
||||||
|
PKG_LICENSE:=GPL-2.0 BSD-3-Clause
|
||||||
|
PKG_LICENSE_FILES:=COPYING LICENCE.miniupnpd
|
||||||
|
|
||||||
PKG_MAINTAINER:=Knyazkov Dmitry <medavedik@gmail.com>
|
PKG_MAINTAINER:=Knyazkov Dmitry <medavedik@gmail.com>
|
||||||
|
|
||||||
PKG_BUILD_PARALLEL:=0
|
PKG_BUILD_PARALLEL:=0
|
||||||
PKG_BUILD_DEPENDS:=util-linux
|
PKG_BUILD_DEPENDS:=util-linux
|
||||||
|
PKG_FIXUP:=autoreconf
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(INCLUDE_DIR)/nls.mk
|
include $(INCLUDE_DIR)/nls.mk
|
||||||
|
|
@ -43,9 +48,6 @@ endef
|
||||||
TARGET_CPPFLAGS += \
|
TARGET_CPPFLAGS += \
|
||||||
-I$(STAGING_DIR)/usr/include \
|
-I$(STAGING_DIR)/usr/include \
|
||||||
-I$(STAGING_DIR)/usr/include/FLAC \
|
-I$(STAGING_DIR)/usr/include/FLAC \
|
||||||
-I$(STAGING_DIR)/usr/include/libavcodec \
|
|
||||||
-I$(STAGING_DIR)/usr/include/libavformat \
|
|
||||||
-I$(STAGING_DIR)/usr/include/libavutil \
|
|
||||||
-I$(STAGING_DIR)/usr/include/libexif \
|
-I$(STAGING_DIR)/usr/include/libexif \
|
||||||
-I$(STAGING_DIR)/usr/include/uuid \
|
-I$(STAGING_DIR)/usr/include/uuid \
|
||||||
-I$(STAGING_DIR)/usr/include/vorbis \
|
-I$(STAGING_DIR)/usr/include/vorbis \
|
||||||
|
|
@ -74,7 +76,7 @@ CONFIGURE_ARGS +=\
|
||||||
|
|
||||||
define Package/minidlna/install
|
define Package/minidlna/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/minidlnad $(1)/usr/bin/minidlna
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/minidlna $(1)/usr/bin/minidlna
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
$(INSTALL_BIN) ./files/minidlna.init $(1)/etc/init.d/minidlna
|
$(INSTALL_BIN) ./files/minidlna.init $(1)/etc/init.d/minidlna
|
||||||
$(INSTALL_DIR) $(1)/etc/config
|
$(INSTALL_DIR) $(1)/etc/config
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=mtd-utils
|
PKG_NAME:=mtd-utils
|
||||||
PKG_VERSION:=1.5.1
|
PKG_VERSION:=1.5.1
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_VERSION:=6d4e751fd861dea1f494b1a91768b3bf401bbab5
|
PKG_SOURCE_VERSION:=ba97a0ae50fda81cf7f5a5f3a6cf4a1807383ae5
|
||||||
|
|
||||||
ifeq ($(CONFIG_BCM_OPEN),y)
|
ifeq ($(CONFIG_BCM_OPEN),y)
|
||||||
PKG_SOURCE_URL:=http://ihgsp.inteno.se/git/mtd-utils
|
PKG_SOURCE_URL:=http://ihgsp.inteno.se/git/mtd-utils
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,7 @@ static void button_handler(struct uloop_timeout *timeout)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* clean out indicator status, set by any valid press again if we find it */
|
/* clean out indicator status, set by any valid press again if we find it */
|
||||||
led_pressindicator_clear();
|
led_pressindicator_set(PRESS_NONE);
|
||||||
|
|
||||||
list_for_each(i, &buttons) {
|
list_for_each(i, &buttons) {
|
||||||
struct list_head *j;
|
struct list_head *j;
|
||||||
|
|
@ -294,6 +294,7 @@ static void button_handler(struct uloop_timeout *timeout)
|
||||||
list_for_each(j, &node->drv_list) {
|
list_for_each(j, &node->drv_list) {
|
||||||
struct button_drv_list *drv_node = list_entry(j, struct button_drv_list, list);
|
struct button_drv_list *drv_node = list_entry(j, struct button_drv_list, list);
|
||||||
if (drv_node->drv) {
|
if (drv_node->drv) {
|
||||||
|
button_press_type_t time_type;
|
||||||
button_state_t st = drv_node->drv->func->get_state(drv_node->drv);
|
button_state_t st = drv_node->drv->func->get_state(drv_node->drv);
|
||||||
|
|
||||||
if (st == BUTTON_PRESSED ) {
|
if (st == BUTTON_PRESSED ) {
|
||||||
|
|
@ -302,8 +303,12 @@ static void button_handler(struct uloop_timeout *timeout)
|
||||||
DBG(1, " %s pressed", drv_node->drv->name);
|
DBG(1, " %s pressed", drv_node->drv->name);
|
||||||
// button_ubus_interface_event(global_ubus_ctx, node->name, BUTTON_PRESSED);
|
// button_ubus_interface_event(global_ubus_ctx, node->name, BUTTON_PRESSED);
|
||||||
}
|
}
|
||||||
if(timer_valid(drv_node, node->minpress, 0))
|
|
||||||
led_pressindicator_set();
|
time_type = timer_valid(drv_node, node->minpress, node->longpress);
|
||||||
|
if( time_type == BUTTON_PRESS_LONG )
|
||||||
|
led_pressindicator_set(PRESS_LONG);
|
||||||
|
if( time_type == BUTTON_PRESS_SHORT )
|
||||||
|
led_pressindicator_set(PRESS_SHORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (st == BUTTON_RELEASED ) {
|
if (st == BUTTON_RELEASED ) {
|
||||||
|
|
@ -313,6 +318,7 @@ static void button_handler(struct uloop_timeout *timeout)
|
||||||
button_ubus_interface_event(global_ubus_ctx, node->name, BUTTON_RELEASED);
|
button_ubus_interface_event(global_ubus_ctx, node->name, BUTTON_RELEASED);
|
||||||
if(node->dimming)
|
if(node->dimming)
|
||||||
led_dimming();
|
led_dimming();
|
||||||
|
DBG(1, " %s released timer_valid=%d", drv_node->drv->name,r);
|
||||||
button_hotplug_cmd(node->name, r==BUTTON_PRESS_LONG);
|
button_hotplug_cmd(node->name, r==BUTTON_PRESS_LONG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -414,7 +420,7 @@ void button_init( struct server_ctx *s_ctx)
|
||||||
{
|
{
|
||||||
struct ucilist *node;
|
struct ucilist *node;
|
||||||
LIST_HEAD(buttonnames);
|
LIST_HEAD(buttonnames);
|
||||||
int default_minpress = 0;
|
int default_minpress = 100;
|
||||||
char *s;
|
char *s;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,14 @@ int board_ioctl(int ioctl_id, int action, int hex, char* string_buf, int string_
|
||||||
IoctlParms.offset = offset;
|
IoctlParms.offset = offset;
|
||||||
IoctlParms.action = action;
|
IoctlParms.action = action;
|
||||||
IoctlParms.buf = (char*)"";
|
IoctlParms.buf = (char*)"";
|
||||||
|
IoctlParms.result = 0;
|
||||||
|
|
||||||
|
if (brcmboard != -1){
|
||||||
|
if ( ioctl(brcmboard, ioctl_id, &IoctlParms) < 0 ) {
|
||||||
|
syslog(LOG_ERR, "ioctl: %d failed", ioctl_id);
|
||||||
|
return(-255);
|
||||||
|
}
|
||||||
|
|
||||||
if ( ioctl(brcmboard, ioctl_id, &IoctlParms) < 0 ) {
|
|
||||||
syslog(LOG_ERR, "ioctl: %d failed", ioctl_id);
|
|
||||||
return(-255);
|
|
||||||
}
|
}
|
||||||
return IoctlParms.result;
|
return IoctlParms.result;
|
||||||
}
|
}
|
||||||
|
|
@ -46,7 +50,6 @@ gpio_state_t gpio_get_state(gpio_t gpio)
|
||||||
return board_ioctl(BOARD_IOCTL_GET_GPIO, 0, 0, NULL, gpio, 0);
|
return board_ioctl(BOARD_IOCTL_GET_GPIO, 0, 0, NULL, gpio, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void gpio_set_state(gpio_t gpio, gpio_state_t state)
|
void gpio_set_state(gpio_t gpio, gpio_state_t state)
|
||||||
{
|
{
|
||||||
board_ioctl(BOARD_IOCTL_SET_GPIO, 0, 0, NULL, gpio, state);
|
board_ioctl(BOARD_IOCTL_SET_GPIO, 0, 0, NULL, gpio, state);
|
||||||
|
|
|
||||||
|
|
@ -81,8 +81,8 @@ struct function_led {
|
||||||
struct function_led *leds; /* Array of functions, LED_FUNCTIONS + super_functions */
|
struct function_led *leds; /* Array of functions, LED_FUNCTIONS + super_functions */
|
||||||
static int total_functions; /* number of entries in leds array */
|
static int total_functions; /* number of entries in leds array */
|
||||||
|
|
||||||
static leds_state_t global_state; /* global state for the leds,overrids individual states */
|
static leds_state_t global_state; /* global state for the leds,overrids individual states */
|
||||||
static leds_state_t press_state; /* global state for the press indicator */
|
static press_t press_state; /* global state for the press indicator */
|
||||||
|
|
||||||
static led_action_t dimming_level; /* The min level where dimming should not happen on led */
|
static led_action_t dimming_level; /* The min level where dimming should not happen on led */
|
||||||
static int dimming_timeout; /* The time to turn on leds when we have dimming on */
|
static int dimming_timeout; /* The time to turn on leds when we have dimming on */
|
||||||
|
|
@ -294,7 +294,7 @@ static void super_update(void)
|
||||||
}
|
}
|
||||||
if (status){
|
if (status){
|
||||||
leds[i].state = j;
|
leds[i].state = j;
|
||||||
DBG(1,"\tSet super function [%s] to action [%s]",leds[i].name, fn_actions[j]);
|
DBG(3,"\tSet super function [%s] to action [%s]",leds[i].name, fn_actions[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -537,11 +537,15 @@ static void flash_handler(struct uloop_timeout *timeout)
|
||||||
global_state == LEDS_INFO ) {
|
global_state == LEDS_INFO ) {
|
||||||
for (i = 0; i < total_functions ; i++) {
|
for (i = 0; i < total_functions ; i++) {
|
||||||
struct led *led;
|
struct led *led;
|
||||||
if (leds[i].press_indicator & press_state) {
|
if (leds[i].press_indicator && (press_state != PRESS_NONE) ) {
|
||||||
// DBG(1,"INDICATE_PRESS on %s",leds[i].name);
|
// DBG(1,"INDICATE_PRESS on %s",leds[i].name);
|
||||||
list_for_each_entry(led, &leds[i].actions[leds[i].state].led_list, list) {
|
list_for_each_entry(led, &leds[i].actions[leds[i].state].led_list, list) {
|
||||||
if (led->drv)
|
if (led->drv){
|
||||||
led->drv->func->set_state(led->drv, fast);
|
if (press_state == PRESS_LONG)
|
||||||
|
led->drv->func->set_state(led->drv, ON);
|
||||||
|
else
|
||||||
|
led->drv->func->set_state(led->drv, fast);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* normal operation, flash else reset state */
|
/* normal operation, flash else reset state */
|
||||||
|
|
@ -609,12 +613,13 @@ static void flash_handler(struct uloop_timeout *timeout)
|
||||||
uloop_timeout_set(&flash_inform_timer, FLASH_TIMEOUT);
|
uloop_timeout_set(&flash_inform_timer, FLASH_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_pressindicator_set(void){
|
void led_pressindicator_set(press_t type){
|
||||||
press_state = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_pressindicator_clear(void){
|
/* press long has prio over short so if it's already set to long do not change */
|
||||||
press_state = 0;
|
if (type == PRESS_SHORT && press_state == PRESS_LONG)
|
||||||
|
return;
|
||||||
|
|
||||||
|
press_state = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_dimming(void){
|
void led_dimming(void){
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,12 @@ typedef enum {
|
||||||
WHITE,
|
WHITE,
|
||||||
} led_color_t;
|
} led_color_t;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
PRESS_NONE,
|
||||||
|
PRESS_SHORT,
|
||||||
|
PRESS_LONG,
|
||||||
|
} press_t;
|
||||||
|
|
||||||
struct led_drv;
|
struct led_drv;
|
||||||
|
|
||||||
struct led_drv_func{
|
struct led_drv_func{
|
||||||
|
|
@ -46,7 +52,6 @@ void led_add( struct led_drv *);
|
||||||
void led_init(struct server_ctx *);
|
void led_init(struct server_ctx *);
|
||||||
|
|
||||||
void led_dimming(void);
|
void led_dimming(void);
|
||||||
void led_pressindicator_set(void);
|
void led_pressindicator_set(press_t type);
|
||||||
void led_pressindicator_clear(void);
|
|
||||||
|
|
||||||
#endif /* LED_H */
|
#endif /* LED_H */
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,12 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/port-management
|
define Package/port-management
|
||||||
CATEGORY:=Base system
|
CATEGORY:=Utilities
|
||||||
TITLE:=Port management tool
|
TITLE:=Port management tool
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/port-management/description
|
define Package/port-management/description
|
||||||
port-management contains necessary tools to create
|
Port configuration utility
|
||||||
layer2 interfaces
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
|
|
|
||||||
30
power-management/Makefile
Normal file
30
power-management/Makefile
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=power-management
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/power-management
|
||||||
|
CATEGORY:=Utilities
|
||||||
|
TITLE:=Power management tool
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/power-management/description
|
||||||
|
Control Broadcom power options
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
|
$(CP) ./files/* $(PKG_BUILD_DIR)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/power-management/install
|
||||||
|
$(CP) ./files/* $(1)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,power-management))
|
||||||
6
power-management/files/etc/config/power_mgmt
Normal file
6
power-management/files/etc/config/power_mgmt
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
config power_mgmt 'power_mgmt'
|
||||||
|
option avs 'stopped'
|
||||||
|
option cpuspeed '0'
|
||||||
|
option cpur4kwait '0'
|
||||||
|
option ethapd '0'
|
||||||
|
option eee '0'
|
||||||
43
power-management/files/etc/init.d/power_mgmt
Executable file
43
power-management/files/etc/init.d/power_mgmt
Executable file
|
|
@ -0,0 +1,43 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=13
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
parsebool() {
|
||||||
|
[ "$1" = "1" ] && echo "on" || echo "off"
|
||||||
|
}
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
config_load power_mgmt
|
||||||
|
|
||||||
|
local speed
|
||||||
|
config_get speed power_mgmt cpuspeed
|
||||||
|
pwrctl config --cpuspeed $speed
|
||||||
|
|
||||||
|
local cpur4kwait
|
||||||
|
config_get cpur4kwait power_mgmt cpur4kwait
|
||||||
|
pwrctl config --cpur4kwait $(parsebool $cpur4kwait)
|
||||||
|
|
||||||
|
local sr
|
||||||
|
config_get sr power_mgmt sr
|
||||||
|
pwrctl config --sr $(parsebool $sr)
|
||||||
|
|
||||||
|
local ethapd
|
||||||
|
config_get ethapd power_mgmt ethapd
|
||||||
|
pwrctl config --ethapd $(parsebool $ethapd)
|
||||||
|
|
||||||
|
local eee
|
||||||
|
config_get eee power_mgmt eee
|
||||||
|
pwrctl config --eee $(parsebool $eee)
|
||||||
|
|
||||||
|
local avs
|
||||||
|
config_get avs power_mgmt avs
|
||||||
|
pwrctl config --avs $avs
|
||||||
|
}
|
||||||
|
|
||||||
|
service_triggers() {
|
||||||
|
procd_add_reload_trigger power_mgmt
|
||||||
|
}
|
||||||
|
|
||||||
4
samba3/Config.in
Normal file
4
samba3/Config.in
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
config SAMBA3_DEBUG
|
||||||
|
bool "Enable Logging for samba3"
|
||||||
|
depends PACKAGE_samba3
|
||||||
|
default n
|
||||||
83
samba3/Makefile
Normal file
83
samba3/Makefile
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
#
|
||||||
|
# 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.24
|
||||||
|
PKG_RELEASE:=8
|
||||||
|
PKG_MD5SUM:=89273f67a6d8067cbbecefaa13747153
|
||||||
|
|
||||||
|
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)/
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
TARGET_CFLAGS+=$(if $(CONFIG_SAMBA3_DEBUG),-DSAMBA_DEBUG)
|
||||||
|
|
||||||
|
define Package/samba3
|
||||||
|
SECTION:=net
|
||||||
|
CATEGORY:=Network
|
||||||
|
SUBMENU:=Filesystem
|
||||||
|
TITLE:=samba3
|
||||||
|
DEPENDS:=+libpthread
|
||||||
|
URL:=http://www.samba.org/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/samba3/Description
|
||||||
|
Samba3 - made small with patches taken from AVM GPL releases and freetz
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/samba3/conffiles
|
||||||
|
/etc/config/samba
|
||||||
|
/etc/samba/smb.conf.template
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/samba3/config
|
||||||
|
source "$(SOURCE)/Config.in"
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Prepare/LFS
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
$(call Build/Prepare/Default)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
[ -f "$(PKG_BUILD_DIR)/source/include/config.h.save" ] || \
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/source/include/config.h \
|
||||||
|
$(PKG_BUILD_DIR)/source/include/config.h.save
|
||||||
|
cat \
|
||||||
|
$(PKG_BUILD_DIR)/source/include/config.h.save \
|
||||||
|
./files/config-lfs.h >> $(PKG_BUILD_DIR)/source/include/config.h
|
||||||
|
$(Build/Configure/Default)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
CC="$(TARGET_CC)" \
|
||||||
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
|
CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
||||||
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR)/source \
|
||||||
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
|
all bin/smbpasswd
|
||||||
|
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/
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/nmbd $(1)/bin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,samba3))
|
||||||
56
samba3/files/config-lfs.h
Normal file
56
samba3/files/config-lfs.h
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
#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
|
||||||
7
samba3/files/samba.config
Normal file
7
samba3/files/samba.config
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
config samba
|
||||||
|
option 'name' 'IntenoSMB'
|
||||||
|
option 'workgroup' 'IntenoSMB'
|
||||||
|
option 'description' 'IntenoSMB'
|
||||||
|
option 'homes' '0'
|
||||||
|
option 'interface' 'lan'
|
||||||
|
|
||||||
145
samba3/files/samba.init
Executable file
145
samba3/files/samba.init
Executable file
|
|
@ -0,0 +1,145 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2008-2012 OpenWrt.org
|
||||||
|
|
||||||
|
START=60
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
useradd()
|
||||||
|
{
|
||||||
|
local user
|
||||||
|
local password
|
||||||
|
config_get user $1 user
|
||||||
|
config_get password $1 password
|
||||||
|
grep -rq "^$user:" /etc/passwd || adduser $user -s /bin/false -D -H -h /mnt/$user
|
||||||
|
/bin/smbpasswd $user $password
|
||||||
|
}
|
||||||
|
|
||||||
|
purgepasswd()
|
||||||
|
{
|
||||||
|
for us in `grep mnt /etc/passwd | cut -d":" -f1`; do
|
||||||
|
deluser $us
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
purgesmbpasswd()
|
||||||
|
{
|
||||||
|
rm -rf /etc/samba/smbpasswd
|
||||||
|
touch /etc/samba/smbpasswd
|
||||||
|
}
|
||||||
|
|
||||||
|
smb_header() {
|
||||||
|
local interface
|
||||||
|
config_get interface $1 interface "loopback lan"
|
||||||
|
|
||||||
|
# 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 ] || 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
|
||||||
|
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
|
||||||
|
purgepasswd
|
||||||
|
purgesmbpasswd
|
||||||
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
|
service_triggers() {
|
||||||
|
procd_add_reload_trigger samba network
|
||||||
|
}
|
||||||
19
samba3/files/smb.conf.template
Normal file
19
samba3/files/smb.conf.template
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
[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 = br-lan
|
||||||
|
bind interfaces only = yes
|
||||||
|
|
||||||
7267
samba3/patches/100-avm.patch
Normal file
7267
samba3/patches/100-avm.patch
Normal file
File diff suppressed because it is too large
Load diff
105
samba3/patches/110-compile_fixes.patch
Normal file
105
samba3/patches/110-compile_fixes.patch
Normal file
|
|
@ -0,0 +1,105 @@
|
||||||
|
Index: samba-3.0.24/source/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- samba-3.0.24.orig/source/Makefile 2008-08-07 11:15:02.000000000 +0200
|
||||||
|
+++ samba-3.0.24/source/Makefile 2008-08-07 11:18:28.000000000 +0200
|
||||||
|
@@ -10,8 +10,6 @@
|
||||||
|
SOURCEROOT=$(shell pwd)/../../../..
|
||||||
|
SHAREDLIBS=$(SOURCEROOT)/sharedlibs
|
||||||
|
|
||||||
|
-include ${SHAREDLIBS}/ar7def.mk
|
||||||
|
-
|
||||||
|
# AR7
|
||||||
|
# prefix=/usr/local/samba
|
||||||
|
prefix=/var/samba
|
||||||
|
@@ -22,25 +20,27 @@
|
||||||
|
LIBS= -lcrypt -ldl -lpthread
|
||||||
|
# AR7
|
||||||
|
# CC=gcc
|
||||||
|
-CC=${TARGET}-gcc
|
||||||
|
+CC?=${TARGET}-gcc
|
||||||
|
RANLIB = ${TARGET}-ranlib
|
||||||
|
AR = ${TARGET}-ar
|
||||||
|
|
||||||
|
SHLD=${CC} ${CFLAGS}
|
||||||
|
# AR7
|
||||||
|
# CFLAGS= -O -D_SAMBA_BUILD_
|
||||||
|
-CFLAGS= -Os -D_SAMBA_BUILD_ -DAVM_NO_PRINTING
|
||||||
|
-CFLAGS+= -DAVM_NO_POPT
|
||||||
|
+CFLAPGS?=
|
||||||
|
+CFLAGS+= -Os -D_SAMBA_BUILD_ -DAVM_NO_PRINTING
|
||||||
|
+#CFLAGS+= -DAVM_NO_POPT
|
||||||
|
CFLAGS+= -DAVM_SMALLER
|
||||||
|
-
|
||||||
|
+#CFLAGS+= -DSAMBA_DEBUG
|
||||||
|
# uncomment this to get debugs
|
||||||
|
# CFLAGS += -DSAMBA_DEBUG
|
||||||
|
|
||||||
|
# AR7
|
||||||
|
# CPPFLAGS= -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
|
||||||
|
-CPPFLAGS= -D_GNU_SOURCE
|
||||||
|
+CPPFLAGS?= -D_GNU_SOURCE
|
||||||
|
+CPPFLAGS+= -D_GNU_SOURCE
|
||||||
|
EXEEXT=
|
||||||
|
-LDFLAGS=
|
||||||
|
+LDFLAGS?=
|
||||||
|
AR=ar
|
||||||
|
LDSHFLAGS=-shared -Wl,-Bsymbolic
|
||||||
|
WINBIND_NSS_LDSHFLAGS=-shared -Wl,-Bsymbolic
|
||||||
|
|
||||||
|
Index: samba-3.0.24/source/popt/popt.c
|
||||||
|
===================================================================
|
||||||
|
--- samba-3.0.24.orig/source/popt/popt.c 2008-08-07 11:15:00.000000000 +0200
|
||||||
|
+++ samba-3.0.24/source/popt/popt.c 2008-08-07 11:15:02.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@*/
|
||||||
|
@@ -384,7 +385,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;
|
||||||
|
|
||||||
|
@@ -1235,4 +1236,3 @@
|
||||||
|
|
||||||
|
return numargs;
|
||||||
|
}
|
||||||
|
-/*@=boundswrite@*/
|
||||||
|
Index: samba-3.0.24/source/smbd/server.c
|
||||||
|
===================================================================
|
||||||
|
--- samba-3.0.24.orig/source/smbd/server.c 2008-08-07 11:15:02.000000000 +0200
|
||||||
|
+++ samba-3.0.24/source/smbd/server.c 2008-08-07 11:15:02.000000000 +0200
|
||||||
|
@@ -47,7 +47,7 @@
|
||||||
|
void _fLog(char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list va;
|
||||||
|
- FILE *fp = fopen("/var/tmp/smbd.log", "a");
|
||||||
|
+ FILE *fp = fopen("/var/log/smbd.log", "a");
|
||||||
|
time_t t = time(0); /* LOG */
|
||||||
|
|
||||||
|
if (!fp) return;
|
||||||
|
@@ -63,7 +63,7 @@
|
||||||
|
void _fDebug(char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list va;
|
||||||
|
- FILE *fp = fopen("/var/tmp/smbd.log", "a");
|
||||||
|
+ FILE *fp = fopen("/var/log/smbd.log", "a");
|
||||||
|
time_t t = time(0); /* LOG */
|
||||||
|
|
||||||
|
if (!fp) return;
|
||||||
57
samba3/patches/120-owrt_paths.patch
Normal file
57
samba3/patches/120-owrt_paths.patch
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
Index: samba-3.0.24/source/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- samba-3.0.24.orig/source/Makefile 2008-08-06 23:33:20.000000000 +0200
|
||||||
|
+++ samba-3.0.24/source/Makefile 2008-08-06 23:34:48.000000000 +0200
|
||||||
|
@@ -12,7 +12,7 @@
|
||||||
|
|
||||||
|
# AR7
|
||||||
|
# prefix=/usr/local/samba
|
||||||
|
-prefix=/var/samba
|
||||||
|
+prefix=
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
|
||||||
|
# AR7
|
||||||
|
@@ -108,11 +108,11 @@
|
||||||
|
# These can be overridden by command line switches (see smbd(8))
|
||||||
|
# or in smb.conf (see smb.conf(5))
|
||||||
|
LOGFILEBASE = ${VARDIR}
|
||||||
|
-CONFIGFILE = $(CONFIGDIR)/smb.conf
|
||||||
|
-LMHOSTSFILE = $(CONFIGDIR)/lmhosts
|
||||||
|
+CONFIGFILE = /etc/samba/smb.conf
|
||||||
|
+LMHOSTSFILE = /etc/lmhosts
|
||||||
|
|
||||||
|
# This is where smbpasswd et al go
|
||||||
|
-PRIVATEDIR = ${prefix}/private
|
||||||
|
+PRIVATEDIR = /etc/samba/
|
||||||
|
|
||||||
|
SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
|
||||||
|
PRIVATE_DIR = $(PRIVATEDIR)
|
||||||
|
@@ -121,10 +121,10 @@
|
||||||
|
SWATDIR = ${prefix}/swat
|
||||||
|
|
||||||
|
# the directory where lock files go
|
||||||
|
-LOCKDIR = ${VARDIR}/locks
|
||||||
|
+LOCKDIR = ${VARDIR}/lock
|
||||||
|
|
||||||
|
# the directory where pid files go
|
||||||
|
-PIDDIR = ${VARDIR}/locks
|
||||||
|
+PIDDIR = ${VARDIR}/lock
|
||||||
|
|
||||||
|
LIBSMBCLIENT=bin/libsmbclient.a bin/libsmbclient.so
|
||||||
|
LIBSMBCLIENT_MAJOR=0
|
||||||
|
Index: samba-3.0.24/source/lib/util.c
|
||||||
|
===================================================================
|
||||||
|
--- samba-3.0.24.orig/source/lib/util.c 2008-08-06 23:41:58.000000000 +0200
|
||||||
|
+++ samba-3.0.24/source/lib/util.c 2008-08-06 23:42:10.000000000 +0200
|
||||||
|
@@ -300,11 +300,7 @@
|
||||||
|
char *p;
|
||||||
|
if ((p = getenv("TMPDIR")))
|
||||||
|
return p;
|
||||||
|
-#if 1 /* AR7 */
|
||||||
|
- return "/var/tmp";
|
||||||
|
-#else
|
||||||
|
return "/tmp";
|
||||||
|
-#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
216
samba3/patches/130-owrt_smbpasswd.patch
Normal file
216
samba3/patches/130-owrt_smbpasswd.patch
Normal file
|
|
@ -0,0 +1,216 @@
|
||||||
|
Index: samba-3.0.24/source/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- samba-3.0.24.orig/source/Makefile 2008-08-07 15:56:45.000000000 +0200
|
||||||
|
+++ samba-3.0.24/source/Makefile 2008-08-07 15:56:45.000000000 +0200
|
||||||
|
@@ -1015,9 +1015,9 @@
|
||||||
|
|
||||||
|
MY_PASS_OBJ = libsmb/smbdes.o lib/md4.o lib/arc4.o
|
||||||
|
|
||||||
|
-bin/smbpasswd: utils/avm_smbpasswd.o $(MY_PASS_OBJ)
|
||||||
|
+bin/smbpasswd: utils/owrt_smbpasswd.o $(MY_PASS_OBJ)
|
||||||
|
@echo Linking $@
|
||||||
|
- @$(CC) $(FLAGS) -o $@ utils/avm_smbpasswd.o $(MY_PASS_OBJ) \
|
||||||
|
+ @$(CC) $(FLAGS) -o $@ utils/owrt_smbpasswd.o $(MY_PASS_OBJ) \
|
||||||
|
-L$(TARGETFS)/lib
|
||||||
|
|
||||||
|
|
||||||
|
Index: samba-3.0.24/source/utils/owrt_smbpasswd.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ samba-3.0.24/source/utils/owrt_smbpasswd.c 2008-08-07 15:58:25.000000000 +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;
|
||||||
|
+}
|
||||||
27
samba3/patches/140-no_mmap.patch
Normal file
27
samba3/patches/140-no_mmap.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
Index: samba-3.0.24/source/include/config.h
|
||||||
|
===================================================================
|
||||||
|
--- samba-3.0.24.orig/source/include/config.h 2008-08-08 17:43:08.000000000 +0200
|
||||||
|
+++ samba-3.0.24/source/include/config.h 2008-08-08 17:44:02.000000000 +0200
|
||||||
|
@@ -821,7 +821,7 @@
|
||||||
|
#define HAVE_MKTIME 1
|
||||||
|
|
||||||
|
/* Whether mmap works */
|
||||||
|
-#define HAVE_MMAP 1
|
||||||
|
+/* #define HAVE_MMAP 1 */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <mntent.h> header file. */
|
||||||
|
#define HAVE_MNTENT_H 1
|
||||||
|
Index: samba-3.0.24/source/tdb/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- samba-3.0.24.orig/source/tdb/Makefile 2008-08-08 17:42:47.000000000 +0200
|
||||||
|
+++ samba-3.0.24/source/tdb/Makefile 2008-08-08 17:44:15.000000000 +0200
|
||||||
|
@@ -2,7 +2,8 @@
|
||||||
|
# Makefile for tdb directory
|
||||||
|
#
|
||||||
|
|
||||||
|
-CFLAGS = -DSTANDALONE -DTDB_DEBUG -g -DHAVE_MMAP=1
|
||||||
|
+CFLAGS = -DSTANDALONE -DTDB_DEBUG -g
|
||||||
|
+#-DHAVE_MMAP=1
|
||||||
|
CC = gcc
|
||||||
|
|
||||||
|
ADMINPROGS = tdbdump tdbbackup
|
||||||
15
samba3/patches/150-fix_ls.patch
Normal file
15
samba3/patches/150-fix_ls.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
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 = ".";
|
||||||
|
}
|
||||||
13
samba3/patches/160-fix_log.patch
Normal file
13
samba3/patches/160-fix_log.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
28
samba3/patches/170-no_rpc.patch
Normal file
28
samba3/patches/170-no_rpc.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
--- a/source/include/config.h
|
||||||
|
+++ b/source/include/config.h
|
||||||
|
@@ -986,13 +986,13 @@
|
||||||
|
/* #undef HAVE_ROOT */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <rpcsvc/nis.h> header file. */
|
||||||
|
-#define HAVE_RPCSVC_NIS_H 1
|
||||||
|
+/* #define HAVE_RPCSVC_NIS_H 1 */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <rpcsvc/ypclnt.h> header file. */
|
||||||
|
-#define HAVE_RPCSVC_YPCLNT_H 1
|
||||||
|
+/* #define HAVE_RPCSVC_YPCLNT_H 1 */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <rpcsvc/yp_prot.h> header file. */
|
||||||
|
-#define HAVE_RPCSVC_YP_PROT_H 1
|
||||||
|
+/* #define HAVE_RPCSVC_YP_PROT_H 1 */
|
||||||
|
|
||||||
|
/* Whether there is a conflicting AUTH_ERROR define in rpc/rpc.h */
|
||||||
|
/* #undef HAVE_RPC_AUTH_ERROR_CONFLICT */
|
||||||
|
@@ -1001,7 +1001,7 @@
|
||||||
|
/* #undef HAVE_RPC_NETTYPE_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <rpc/rpc.h> header file. */
|
||||||
|
-#define HAVE_RPC_RPC_H 1
|
||||||
|
+/* #define HAVE_RPC_RPC_H 1 */
|
||||||
|
|
||||||
|
/* Whether mkstemp is secure */
|
||||||
|
#define HAVE_SECURE_MKSTEMP 1
|
||||||
12
samba3/patches/180-fix_duplicate_define.patch
Normal file
12
samba3/patches/180-fix_duplicate_define.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
--- a/source/include/config.h
|
||||||
|
+++ b/source/include/config.h
|
||||||
|
@@ -1848,8 +1848,7 @@
|
||||||
|
#define SIZEOF_LONG 4
|
||||||
|
|
||||||
|
/* The size of the 'off_t' type */
|
||||||
|
-/* AR7 #define SIZEOF_OFF_T 8 */
|
||||||
|
-#define SIZEOF_OFF_T 4 /* AR7 */
|
||||||
|
+/* #define SIZEOF_OFF_T 8 */
|
||||||
|
|
||||||
|
/* The size of a `short', as computed by sizeof. */
|
||||||
|
#define SIZEOF_SHORT 2
|
||||||
53
sipcalc/Makefile
Normal file
53
sipcalc/Makefile
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2006-2009 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:=sipcalc
|
||||||
|
PKG_VERSION:=1.1.5
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=http://www.routemeister.net/projects/sipcalc/files \
|
||||||
|
http://download.google.com/mirror
|
||||||
|
PKG_MD5SUM:=8d59e70d21d8f0568e310d342e3e2306
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/sipcalc
|
||||||
|
SECTION:=ipv6
|
||||||
|
CATEGORY:=Network
|
||||||
|
TITLE:=IPv6 IPv4 Calculation Program
|
||||||
|
URL:=http://www.routemeister.net/projects/sipcalc/
|
||||||
|
DEPENDS:=+kmod-ipv6
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/sipcalc/description
|
||||||
|
IPv6 IPv4 Calculation Program.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
$(call Build/Configure/Default,\
|
||||||
|
--with-pidfile=/var/run/sipcalc.pid \
|
||||||
|
)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
|
sipcalc_LDADD=""
|
||||||
|
endef
|
||||||
|
|
||||||
|
#define Package/sipcalc/conffiles
|
||||||
|
#/etc/config/sipcalc
|
||||||
|
#endef
|
||||||
|
|
||||||
|
define Package/sipcalc/install
|
||||||
|
$(INSTALL_DIR) $(1)/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sipcalc $(1)/sbin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,sipcalc))
|
||||||
|
|
@ -5,7 +5,7 @@ batch=no
|
||||||
safeshutdown=yes
|
safeshutdown=yes
|
||||||
|
|
||||||
[csv]
|
[csv]
|
||||||
usegmtime=yes ; log date/time in GMT. Default is "no"
|
usegmtime=no ; log date/time in GMT. Default is "no"
|
||||||
loguniqueid=yes ; log uniqueid. Default is "no"
|
loguniqueid=yes ; log uniqueid. Default is "no"
|
||||||
loguserfield=yes ; log user field. Default is "no"
|
loguserfield=yes ; log user field. Default is "no"
|
||||||
accountlogs=no ; create separate log file for each account code. Default is "yes"
|
accountlogs=no ; create separate log file for each account code. Default is "yes"
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,6 @@ config 'sip_service_provider' 'sip0'
|
||||||
option 'codec2' 'g729'
|
option 'codec2' 'g729'
|
||||||
option 'codec3' 'g726'
|
option 'codec3' 'g726'
|
||||||
option 'autoframing' '1'
|
option 'autoframing' '1'
|
||||||
option 'call_lines' 'BRCM/0 BRCM/4'
|
|
||||||
option 'cfim_on' '*21*'
|
option 'cfim_on' '*21*'
|
||||||
option 'cfim_off' '#21#'
|
option 'cfim_off' '#21#'
|
||||||
option 'cfbs_on' '*61*'
|
option 'cfbs_on' '*61*'
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,79 @@ read_lines()
|
||||||
{
|
{
|
||||||
local lines=""
|
local lines=""
|
||||||
local call_lines
|
local call_lines
|
||||||
|
local fsxIdx fsxEpt dectIdx dectEpt
|
||||||
|
|
||||||
|
# Are lines already set by user conf?
|
||||||
config_get call_lines $1 call_lines
|
config_get call_lines $1 call_lines
|
||||||
|
|
||||||
|
# Otherwise set default depending on board HW. This
|
||||||
|
# is only done at very first boot or a default reset.
|
||||||
|
if test -z "$call_lines"; then
|
||||||
|
# Get all FSX voice endpoints. Translate to uppercase with awk
|
||||||
|
# due to tr [:upper:] doesn't work in our BusyBox.
|
||||||
|
voicePorts=$(db get hw.board.VoicePortOrder | \
|
||||||
|
awk '{ print toupper($0) }' | \
|
||||||
|
sed -e "s/\([[:alpha:]]*\)\([[:digit:]]\)/\1\/\2/g")
|
||||||
|
voiceNames=$(db get hw.board.VoicePortNames)
|
||||||
|
hasVoice=0
|
||||||
|
|
||||||
|
if test $(db get hw.board.hasVoice) = "1"; then
|
||||||
|
# Get the first FSX voice endpoint index by
|
||||||
|
# searching for the name usually used.
|
||||||
|
fsxIdx=$(echo $voiceNames | \
|
||||||
|
awk -e '{
|
||||||
|
i = 1;
|
||||||
|
while(i <= NF && tolower($i) !~ /^tel.*$/) {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
print i;
|
||||||
|
}
|
||||||
|
')
|
||||||
|
|
||||||
|
# Convert index to endpoint ID
|
||||||
|
if test $fsxIdx -gt 0; then
|
||||||
|
fsxEpt=$(echo $voicePorts | awk '{ print $'$fsxIdx' }')
|
||||||
|
fi
|
||||||
|
|
||||||
|
hasVoice=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $(db get hw.board.hasDect) = "1"; then
|
||||||
|
# Get the first Dect voice endpoint index by
|
||||||
|
# searching for the name usually used.
|
||||||
|
dectIdx=$(echo $voiceNames | \
|
||||||
|
awk -e '{
|
||||||
|
i = 1;
|
||||||
|
while(i <= NF && tolower($i) !~ /^dect.*$/) {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
print i;
|
||||||
|
}
|
||||||
|
')
|
||||||
|
|
||||||
|
if test $dectIdx -gt 0; then
|
||||||
|
dectEpt=$(echo $voicePorts | awk '{ print $'$dectIdx' }')
|
||||||
|
fi
|
||||||
|
|
||||||
|
hasVoice=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $hasVoice -eq 1; then
|
||||||
|
call_lines="$dectEpt $fsxEpt"
|
||||||
|
|
||||||
|
# If we didn't find any endpoint ID we
|
||||||
|
# fallback to activate them all.
|
||||||
|
if test -z "$call_lines"; then
|
||||||
|
call_lines="$voicePorts"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Save the endpoint IDs we found where the
|
||||||
|
# GUI expects to find them.
|
||||||
|
uci_set voice_client "${1}" "call_lines" "$call_lines"
|
||||||
|
uci_commit voice_client
|
||||||
|
fi
|
||||||
|
|
||||||
for i in $call_lines ; do
|
for i in $call_lines ; do
|
||||||
case $i in
|
case $i in
|
||||||
''|*[!0-9]*) lines=$lines"$i&" ;;
|
''|*[!0-9]*) lines=$lines"$i&" ;;
|
||||||
|
|
@ -1503,7 +1575,7 @@ configure_extensions_provider()
|
||||||
call_filter_macro=$(get_call_filter $1 incoming)
|
call_filter_macro=$(get_call_filter $1 incoming)
|
||||||
echo "exten => $user,1,$call_filter_macro" >> $tmp
|
echo "exten => $user,1,$call_filter_macro" >> $tmp
|
||||||
|
|
||||||
local call_lines call_ivr call_queue extension
|
local call_ivr call_queue extension
|
||||||
echo "exten => $user,n,Set(__TRANSFER_CONTEXT=\${CHANNEL(peername)}-transfer)" >> $tmp
|
echo "exten => $user,n,Set(__TRANSFER_CONTEXT=\${CHANNEL(peername)}-transfer)" >> $tmp
|
||||||
|
|
||||||
# replace prefix '+' with '00'
|
# replace prefix '+' with '00'
|
||||||
|
|
@ -1511,12 +1583,11 @@ configure_extensions_provider()
|
||||||
echo "exten => $user,n(rewrite),Set(CALLERID(num)=\"00\${CALLERID(num):1}\"))" >> $tmp
|
echo "exten => $user,n(rewrite),Set(CALLERID(num)=\"00\${CALLERID(num):1}\"))" >> $tmp
|
||||||
echo "exten => $user,n(norewrite),NoOp()">> $tmp
|
echo "exten => $user,n(norewrite),NoOp()">> $tmp
|
||||||
|
|
||||||
config_get call_lines $1 call_lines
|
# read a list of lines that should be dialled on incoming calls
|
||||||
|
incoming_lines=$(read_lines $1)
|
||||||
config_get call_queue $1 call_queue
|
config_get call_queue $1 call_queue
|
||||||
config_get call_ivr $1 call_ivr
|
config_get call_ivr $1 call_ivr
|
||||||
if ! [ -z "$call_lines" ] ; then
|
if [ -n "$incoming_lines" ]; then
|
||||||
# read a list of lines that should be dialled on incoming calls
|
|
||||||
incoming_lines=$(read_lines $1)
|
|
||||||
echo "exten => $user,n,Dial($incoming_lines,$(get_voicemail_timeout),tF(hangup,h,2))" >> $tmp
|
echo "exten => $user,n,Dial($incoming_lines,$(get_voicemail_timeout),tF(hangup,h,2))" >> $tmp
|
||||||
echo "exten => $user,n,GotoIf($[\"\${DIALSTATUS}\"=\"ANSWER\"]?endcall)" >> $tmp
|
echo "exten => $user,n,GotoIf($[\"\${DIALSTATUS}\"=\"ANSWER\"]?endcall)" >> $tmp
|
||||||
echo "exten => $user,n,GotoIf($[\"\${DIALSTATUS}\"=\"BUSY\"]?noanswer)" >> $tmp
|
echo "exten => $user,n,GotoIf($[\"\${DIALSTATUS}\"=\"BUSY\"]?noanswer)" >> $tmp
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_BRANCH:=svn-0.11
|
PKG_BRANCH:=svn-0.11
|
||||||
PKG_NAME:=luci
|
PKG_NAME:=luci
|
||||||
PKG_VERSION:=inteno-1.1.23
|
PKG_VERSION:=inteno-1.1.31
|
||||||
PKG_SOURCE_VERSION:=b6a3e17fdc46efaa8f769ce70e9d529be6f38da4
|
PKG_SOURCE_VERSION:=a1ecfd5a5b59f4ed3377c2f7885dd9c5431bb74a
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
ifeq ($(CONFIG_BCM_OPEN),y)
|
ifeq ($(CONFIG_BCM_OPEN),y)
|
||||||
|
|
@ -474,7 +474,7 @@ $(eval $(call application,port-management,LuCI Support for Port Management,\
|
||||||
+PACKAGE_luci-app-port-management:port-management))
|
+PACKAGE_luci-app-port-management:port-management))
|
||||||
|
|
||||||
$(eval $(call application,power-mgmt,LuCI Support for Power Management,\
|
$(eval $(call application,power-mgmt,LuCI Support for Power Management,\
|
||||||
+PACKAGE_luci-app-power-mgmt))
|
+PACKAGE_luci-app-power-mgmt:power-management))
|
||||||
|
|
||||||
$(eval $(call application,parental-control,LuCI Support for Parental Control,\
|
$(eval $(call application,parental-control,LuCI Support for Parental Control,\
|
||||||
+PACKAGE_luci-app-parental-control))
|
+PACKAGE_luci-app-parental-control))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue