3
# DP: all diffs to the isdnlog directory
6
if [ $# -eq 3 -a "$2" = '-d' ]; then
9
elif [ $# -ne 1 ]; then
10
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
15
patch $pdir -f --no-backup-if-mismatch -p1 < $0
16
#cd ${dir}gcc && autoconf
19
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
20
#rm ${dir}gcc/configure
23
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
28
--- isdnutils-3.3.orig/isdnlog/isdnrep/isdnbill.c
29
+++ isdnutils-3.3/isdnlog/isdnrep/isdnbill.c
32
auto FILE *f = fopen("/www/log/isdn.log", "r");
34
- auto FILE *f = fopen("/var/log/isdn.log", "r");
35
+ auto FILE *f = fopen("/var/lib/isdn/calls", "r");
37
auto char s[BUFSIZ], sx[BUFSIZ];
38
auto int i, l, col, day, lday = UNKNOWN, month, lmonth = UNKNOWN;
39
--- isdnutils-3.3.orig/isdnlog/samples/stop
40
+++ isdnutils-3.3/isdnlog/samples/stop
44
-# very simple reload-example for the new chargemax feature of isdnlog
45
-# this is called by isdnlog every time we get a AOCD and chargesum of
46
-# active device is greater then CHARGEMAX.
47
-# there are three parameter available:
48
+# Very simple reload default for the chargemax feature of isdnlog.
49
+# This is called by isdnlog every time we get a AOCD and chargesum of
50
+# active device is greater than CHARGEMAX.
51
+# there are three parameters available:
53
# first ($1) is chargesum-CHARGEMAX
54
# second ($2) is ALIAS as defined in ISDNLOG.CONF
55
# third ($3) is total chargesum for active device
57
+msg=`tempfile -p isdn`
65
- echo "WARNING, charge-limit set by CHARGEMAX is reached!" >> /dev/console
66
- echo "$2 is talking to much!" >> /dev/console
67
-# /bin/aplay /usr/sounds/attention.au
68
+ myecho "WARNING, charge-limit set by CHARGEMAX is reached!"
69
+ myecho "$2 is talking too much!"
70
+# /bin/play /usr/sounds/attention.au
74
- echo "WARNING, $2 got charge-overflow == $1, total chargesum == $3" >> /dev/console
75
- echo "next chargeint will cause i4l to stop" >> /dev/console
76
-# /bin/aplay /usr/sounds/earthdestruction.au
77
+ myecho "WARNING, $2 got charge-overflow == $1, total chargesum == $3"
78
+ myecho "next chargeint will cause i4l to stop"
79
+# /bin/play /usr/sounds/earthdestruction.au
83
- echo "reload got charge-overflow == $1, now i4l will be stopped!" >> /dev/console
84
- /sbin/init.d/i4l stop
85
+ myecho "reload got charge-overflow == $1, now ipppd will be stopped!"
86
+ /sbin/init.d/isdnutils stop ipppd
90
- echo "aeh, still alive?! so we'll do a reboot!!" >> /dev/console
91
-# /bin/aplay /usr/sounds/crash.au
93
+# echo "aeh, still alive?! so we'll do a reboot!!" >> /dev/console
94
+# /bin/play /usr/sounds/crash.au
96
+ myecho "still alive?! Stopping ISDN subsystem!"
97
+ /usr/sbin/isdnctrl system off
101
-echo "got charge_ov=$1 dev=$2 scharge=$3 " >> /dev/console
102
+myecho "got charge_ov=$1 dev=$2 scharge=$3 "
104
+if [ -s "$msg" ]; then
105
+ logger -f $msg -p daemon.notice -t isdnlog
106
+ cat $msg >> /dev/console
111
--- isdnutils-3.3.orig/isdnlog/samples/rate.conf.default
112
+++ isdnutils-3.3/isdnlog/samples/rate.conf.default
115
--- isdnutils-3.3.orig/isdnlog/tools/cdb/Makefile.in
116
+++ isdnutils-3.3/isdnlog/tools/cdb/Makefile.in
118
-rm config.{status,log,h,cache} Makefile .depend
121
- install -d -m0755 $(MAN1DIR) $(MAN3DIR) $(LIBDIR) $(BINDIR) \
123
+ install -d -m0755 $(MAN1DIR) $(MAN3DIR) $(LIBDIR) $(BINDIR) $(INCDIR)
126
- install -m0755 $(BINS) $(BINDIR)
127
- install -m0644 $(MAN1) $(MAN1DIR)
128
- install -m0644 $(MAN3) $(MAN3DIR)
129
- install -m0644 $(LIBS) $(LIBDIR)
130
- install -m0644 freecdb.h freecdbmake.h $(INCDIR)
132
+ # install -m0755 $(BINS) $(BINDIR)
133
+ # install -m0644 $(MAN1) $(MAN1DIR)
134
+ # install -m0644 $(MAN3) $(MAN3DIR)
135
+ # install -m0644 $(LIBS) $(LIBDIR)
136
+ # install -m0644 freecdb.h freecdbmake.h $(INCDIR)
138
cdbdump: cdbdump.o cdb_unpack.o
140
--- isdnutils-3.3.orig/isdnlog/tools/isdnrate.man
141
+++ isdnutils-3.3/isdnlog/tools/isdnrate.man
145
Start as a daemon, waiting for connections from a client. The socket
147
-is created, which clients can connect to.
148
+.I /var/run/isdnrate/socket
149
+is created, which clients can connect to
150
+(the socket can be changed by using the -O option).
153
Start as a daemon and go background.
158
-Write socket to given filename on start of daemon. Default is
160
+Use given filename as the socket on start of daemon. Default is
161
+.IR /var/run/isdnrate/socket .
165
--- isdnutils-3.3.orig/isdnlog/tools/tools.h
166
+++ isdnutils-3.3/isdnlog/tools/tools.h
169
#define _GNU_SOURCE 1
171
+#include <sys/types.h>
172
+#include <sys/time.h>
173
+#include <sys/times.h>
174
+#include <sys/stat.h>
175
+#include <sys/resource.h>
176
+#include <sys/wait.h>
177
+#include <sys/socket.h>
185
-#include <sys/time.h>
186
-#include <sys/times.h>
187
-#include <sys/types.h>
188
-#include <sys/stat.h>
189
-#include <sys/wait.h>
190
-#include <sys/socket.h>
192
#include <netinet/in.h>
193
#include <arpa/inet.h>
194
--- isdnutils-3.3.orig/isdnlog/tools/zone.c
195
+++ isdnutils-3.3/isdnlog/tools/zone.c
200
- strncpy(newfrom, from, LENGTH-1);
201
+ if (newfrom != from)
202
+ memmove(newfrom, from, LENGTH-1);
203
while (strlen(newfrom)) {
204
UL lifrom = (UL) atol(newfrom); /* keys could be long */
205
US ifrom = (US) lifrom;
206
--- isdnutils-3.3.orig/isdnlog/holiday-default.dat
207
+++ isdnutils-3.3/isdnlog/holiday-default.dat
209
+V:-0.1 default [2001/10/10]
223
+D:1.1 New Year's Day
227
--- isdnutils-3.3.orig/isdnlog/rate-default.dat
228
+++ isdnutils-3.3/isdnlog/rate-default.dat
230
+V:0.01-default [2001/10/10]
238
+# 1 currency unit per minute
242
--- ./isdnlog/Makefile.in~ 2004-07-24 14:03:36.000000000 +0200
243
+++ ./isdnlog/Makefile.in 2004-08-24 19:51:57.000000000 +0200
244
@@ -2011,7 +2011,7 @@
245
$(INSTALL_DATA) $$f $(DESTDIR)$(DATADIR); \
246
echo Installing $(DESTDIR)$(DATADIR)/$$f; \
248
- @(grep isdnlog $(SERVICEFILE) >/dev/null) || \
249
+ -@(grep isdnlog $(SERVICEFILE) >/dev/null) || \
250
(echo "";echo "";echo "Add a line to the file $(SERVICEFILE)" ;echo "";echo ""; \
251
echo "isdnlog $(SERV_PORT)/tcp isdnlog" >> $(SERVICEFILE))