summaryrefslogtreecommitdiffstats
path: root/package/br2684ctl
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-04-20 15:11:18 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-04-20 15:11:18 +0000
commitae925a8f7244bfc78c9f3a17c027a4f273a44032 (patch)
tree16c55ac175aa0e348fa3e9215fef08286c304bb8 /package/br2684ctl
parent7bdb5dcae0d873bf99f34a1e3e1ca3fdfc7c6ab2 (diff)
downloadmaster-31e0f0ae-ae925a8f7244bfc78c9f3a17c027a4f273a44032.tar.gz
master-31e0f0ae-ae925a8f7244bfc78c9f3a17c027a4f273a44032.tar.bz2
master-31e0f0ae-ae925a8f7244bfc78c9f3a17c027a4f273a44032.zip
upgrade to new version of br2684ctl
SVN-Revision: 7011
Diffstat (limited to 'package/br2684ctl')
-rw-r--r--package/br2684ctl/Makefile38
-rw-r--r--package/br2684ctl/patches/100-debian.patch91
2 files changed, 129 insertions, 0 deletions
diff --git a/package/br2684ctl/Makefile b/package/br2684ctl/Makefile
new file mode 100644
index 0000000000..7c75c9499e
--- /dev/null
+++ b/package/br2684ctl/Makefile
@@ -0,0 +1,38 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: Makefile 6582 2007-03-16 20:21:39Z nbd $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=br2684ctl
+PKG_VERSION:=20040226
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
+PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/b/br2684ctl
+PKG_MD5SUM:=6eb4d8cd174e24a7c078eb4f594f5b69
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+ SECTION:=net
+ CATEGORY:=Base system
+ TITLE:=ATM Ethernet bridging configuration utility
+ DESCRIPTION:=ATM Ethernet bridging configuration utility
+ URL:=http://ftp.debian.org/debian/pool/main/b/br2684ctl
+endef
+
+MAKE_FLAGS += CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)"
+
+define Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/package/br2684ctl/patches/100-debian.patch b/package/br2684ctl/patches/100-debian.patch
new file mode 100644
index 0000000000..bfcd4ec6a3
--- /dev/null
+++ b/package/br2684ctl/patches/100-debian.patch
@@ -0,0 +1,91 @@
+--- br2684ctl-20040226.orig/br2684ctl.c
++++ br2684ctl-20040226/br2684ctl.c
+@@ -3,6 +3,8 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
++#include <signal.h>
+ #include <string.h>
+ #include <syslog.h>
+ #include <atm.h>
+@@ -22,9 +24,9 @@
+ */
+
+
+-#define LOG_NAME "RFC1483/2684 bridge"
+-#define LOG_OPTION LOG_PERROR
+-#define LOG_FACILITY LOG_LOCAL0
++#define LOG_NAME "br2684ctl"
++#define LOG_OPTION LOG_PERROR|LOG_PID
++#define LOG_FACILITY LOG_LOCAL2
+
+
+ int lastsock, lastitf;
+@@ -39,10 +41,16 @@
+
+ void exitFunc(void)
+ {
+- syslog (LOG_PID,"Daemon terminated\n");
++ syslog (LOG_NOTICE,"Daemon terminated\n");
+ }
+
+
++void int_signal(int dummy)
++{
++ syslog (LOG_INFO,"Killed by a signal\n");
++ exit(0);
++}
++
+ int create_pidfile(int num)
+ {
+ FILE *pidfile = NULL;
+@@ -80,7 +88,7 @@
+ err=ioctl (lastsock, ATM_NEWBACKENDIF, &ni);
+
+ if (err == 0)
+- syslog(LOG_INFO, "Interface \"%s\" created sucessfully\n",ni.ifname);
++ syslog(LOG_NOTICE, "Interface \"%s\" created sucessfully\n",ni.ifname);
+ else
+ syslog(LOG_INFO, "Interface \"%s\" could not be created, reason: %s\n",
+ ni.ifname,
+@@ -112,7 +120,7 @@
+ addr.sap_addr.vpi = 0;
+ addr.sap_addr.vci = vci;
+ #endif
+- syslog(LOG_INFO,"Communicating over ATM %d.%d.%d, encapsulation: %s\n", addr.sap_addr.itf,
++ syslog(LOG_NOTICE,"Communicating over ATM %d.%d.%d, encapsulation: %s\n", addr.sap_addr.itf,
+ addr.sap_addr.vpi,
+ addr.sap_addr.vci,
+ encap?"VC mux":"LLC");
+@@ -261,11 +269,13 @@
+ }
+
+ create_pidfile(itfnum);
++ signal(SIGINT, int_signal);
++ signal(SIGTERM, int_signal);
+
+ syslog (LOG_INFO, "RFC 1483/2684 bridge daemon started\n");
+ atexit (exitFunc);
+
+- while (1) sleep(30); /* to keep the sockets... */
++ while (1) pause(); /* to keep the sockets... */
+ return 0;
+ }
+
+--- br2684ctl-20040226.orig/Makefile
++++ br2684ctl-20040226/Makefile
+@@ -0,0 +1,13 @@
++OPTS := -O2
++CFLAGS := -Wall -g
++LIBS := -latm
++
++all: br2684ctl
++
++br2684ctl: br2684ctl.c
++ $(CC) $(OPTS) $(CFLAGS) $(LIBS) $< -o $@
++
++distclean: clean
++clean:
++ rm -f br2684ctl
++