SOURCES: br2684ctl-debian.patch (NEW) - extracted from http://ftp....

qboosh qboosh at pld-linux.org
Thu Nov 29 20:43:30 CET 2007


Author: qboosh                       Date: Thu Nov 29 19:43:30 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- extracted from http://ftp.debian.org/debian/pool/main/b/br2684ctl/br2684ctl_20040226-1.diff.gz

---- Files affected:
SOURCES:
   br2684ctl-debian.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/br2684ctl-debian.patch
diff -u /dev/null SOURCES/br2684ctl-debian.patch:1.1
--- /dev/null	Thu Nov 29 20:43:30 2007
+++ SOURCES/br2684ctl-debian.patch	Thu Nov 29 20:43:25 2007
@@ -0,0 +1,110 @@
+--- br2684ctl-20040226.orig/br2684ctl.8
++++ br2684ctl-20040226/br2684ctl.8
+@@ -1,5 +1,5 @@
+ .\"
+-.TH br2684ctl 1 "7 Jul 2003"
++.TH br2684ctl 8 "7 Jul 2003"
+ .SH NAME
+ br2684ctl \- RFC1483/2684 Bridge Daemon
+ .SH SYNOPSIS
+@@ -68,6 +68,9 @@
+ also assign a Ethernet MAC address to the interface nas0, if necessary.
+ 
+ % ifconfig nas0 192.168.2.1 netmask 255.255.255.0
++
++Messages are logged to the LOCAL2 syslog facility.
++
+ .SH NOTES
+ This man page is based on a tutorial by by Joonbum Byun <jbyun at megaxess.com>
+ .SH SEE ALSO
+--- 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
++
================================================================


More information about the pld-cvs-commit mailing list