OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael Schloh
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 26-Mar-2004 16:42:29
Branch: HEAD Handle: 2004032615422800
Modified files:
openpkg-src/ripe-dbase rc.ripe-dbase rc.ripe-dbase.extobjs rc.ripe-filter
ripe-dbase.spec whois_filt.pl
Log:
update whois_filt script, add primitive std[err|out] logging to
rc.ripe-filter, and remove daily section logic from rip_whois process
which logs using ISO dates already
Summary:
Revision Changes Path
1.10 +0 -16 openpkg-src/ripe-dbase/rc.ripe-dbase
1.4 +0 -16 openpkg-src/ripe-dbase/rc.ripe-dbase.extobjs
1.2 +30 -1 openpkg-src/ripe-dbase/rc.ripe-filter
1.31 +2 -2 openpkg-src/ripe-dbase/ripe-dbase.spec
1.2 +13 -16 openpkg-src/ripe-dbase/whois_filt.pl
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/ripe-dbase/rc.ripe-dbase
============================================================================
$ cvs diff -u -r1.9 -r1.10 rc.ripe-dbase
--- openpkg-src/ripe-dbase/rc.ripe-dbase 19 Mar 2004 13:31:04 -0000 1.9
+++ openpkg-src/ripe-dbase/rc.ripe-dbase 26 Mar 2004 15:42:28 -0000 1.10
@@ -5,11 +5,6 @@
%config
ripe_dbase_enable="$openpkg_rc_def"
- ripe_dbase_log_prolog="true"
- ripe_dbase_log_epilog="true"
- ripe_dbase_log_numfiles="10"
- ripe_dbase_log_minsize="1M"
- ripe_dbase_log_complevel="9"
%common
ripe_dbase_pidfile="@l_prefix@/var/ripe-dbase/whois_rip.pid"
@@ -43,15 +38,4 @@
rcService ripe-dbase enable yes || exit 0
rcService ripe-dbase active no && exit 0
rc ripe-dbase stop start
-
-%daily -u @l_susr@
- rcService ripe-dbase enable yes || exit 0
-
- # rotate logfile
- shtool rotate -f \
- -n ${ripe_dbase_log_numfiles} -s ${ripe_dbase_log_minsize} -d \
- -z ${ripe_dbase_log_complevel} -m 644 -o @l_susr@ -g @l_sgrp@ \
- -P "${ripe_dbase_log_prolog}" \
- -E "${ripe_dbase_log_epilog} && rc ripe_dbase restart" \
- @l_prefix@/var/ripe-dbase/log/whois_rip.err.log
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/ripe-dbase/rc.ripe-dbase.extobjs
============================================================================
$ cvs diff -u -r1.3 -r1.4 rc.ripe-dbase.extobjs
--- openpkg-src/ripe-dbase/rc.ripe-dbase.extobjs 23 Mar 2004 15:16:24 -0000
1.3
+++ openpkg-src/ripe-dbase/rc.ripe-dbase.extobjs 26 Mar 2004 15:42:28 -0000
1.4
@@ -5,11 +5,6 @@
%config
ripe_dbase_enable="$openpkg_rc_def"
- ripe_dbase_log_prolog="true"
- ripe_dbase_log_epilog="true"
- ripe_dbase_log_numfiles="10"
- ripe_dbase_log_minsize="1M"
- ripe_dbase_log_complevel="9"
%common
ripe_dbase_pidfile="@l_prefix@/var/ripe-dbase/whois_rip.pid"
@@ -53,15 +48,4 @@
rcService ripe-dbase enable yes || exit 0
rcService ripe-dbase active no && exit 0
rc ripe-dbase stop start
-
-%daily -u @l_susr@
- rcService ripe-dbase enable yes || exit 0
-
- # rotate logfile
- shtool rotate -f \
- -n ${ripe_dbase_log_numfiles} -s ${ripe_dbase_log_minsize} -d \
- -z ${ripe_dbase_log_complevel} -m 644 -o @l_susr@ -g @l_sgrp@ \
- -P "${ripe_dbase_log_prolog}" \
- -E "${ripe_dbase_log_epilog} && rc ripe_dbase restart" \
- @l_prefix@/var/ripe-dbase/log/whois_rip.err.log
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/ripe-dbase/rc.ripe-filter
============================================================================
$ cvs diff -u -r1.1 -r1.2 rc.ripe-filter
--- openpkg-src/ripe-dbase/rc.ripe-filter 23 Mar 2004 15:16:24 -0000 1.1
+++ openpkg-src/ripe-dbase/rc.ripe-filter 26 Mar 2004 15:42:28 -0000 1.2
@@ -5,6 +5,16 @@
%config
ripe_filter_enable="$openpkg_rc_def"
+ ripe_filter_out_prolog="true"
+ ripe_filter_out_epilog="true"
+ ripe_filter_out_numfiles="10"
+ ripe_filter_out_minsize="1M"
+ ripe_filter_out_complevel="9"
+ ripe_filter_err_prolog="true"
+ ripe_filter_err_epilog="true"
+ ripe_filter_err_numfiles="10"
+ ripe_filter_err_minsize="1M"
+ ripe_filter_err_complevel="9"
%common
ripe_filter_pidfile="@l_prefix@/var/ripe-dbase/whois_filt.pid"
@@ -24,7 +34,9 @@
%start -u @l_susr@
rcService ripe-filter enable yes || exit 0
rcService ripe-filter active yes && exit 0
- @l_prefix@/bin/whois_filt &
+ @l_prefix@/bin/whois_filt \
+ 1>>@l_prefix@/var/ripe-dbase/log/filtout.log \
+ 2>>@l_prefix@/var/ripe-dbase/log/filterr.log &
%stop -u @l_susr@
rcService ripe-filter enable yes || exit 0
@@ -40,4 +52,21 @@
%daily -u @l_susr@
rcService ripe-filter enable yes || exit 0
+
+%daily -u @l_susr@
+ rcService ripe-filter enable yes || exit 0
+
+ # rotate logfiles
+ shtool rotate -f \
+ -n ${ripe_filter_out_numfiles} -s ${ripe_filter_out_minsize} -d \
+ -z ${ripe_filter_out_complevel} -m 644 -o @l_susr@ -g @l_sgrp@ \
+ -P "${ripe_filter_out_prolog}" \
+ -E "${ripe_filter_out_epilog} && rc ripe_dbase restart" \
+ @l_prefix@/var/ripe-dbase/log/filtout.log
+ shtool rotate -f \
+ -n ${ripe_filter_err_numfiles} -s ${ripe_filter_err_minsize} -d \
+ -z ${ripe_filter_err_complevel} -m 644 -o @l_susr@ -g @l_sgrp@ \
+ -P "${ripe_filter_err_prolog}" \
+ -E "${ripe_filter_err_epilog} && rc ripe_dbase restart" \
+ @l_prefix@/var/ripe-dbase/log/filterr.log
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/ripe-dbase/ripe-dbase.spec
============================================================================
$ cvs diff -u -r1.30 -r1.31 ripe-dbase.spec
--- openpkg-src/ripe-dbase/ripe-dbase.spec 23 Mar 2004 15:16:24 -0000 1.30
+++ openpkg-src/ripe-dbase/ripe-dbase.spec 26 Mar 2004 15:42:28 -0000 1.31
@@ -34,7 +34,7 @@
Group: Database
License: RIPE NCC
Version: 3.2.0
-Release: 20040323
+Release: 20040326
# package options
%option with_extobjs no
@@ -61,7 +61,7 @@
BuildPreReq: libxml, libxslt, imap, zlib, openssl
PreReq: libxml, libxslt, imap, zlib, openssl
%if "%{with_extobjs}" == "yes"
-PreReq: perl-ripe
+PreReq: ripe-asused
%endif
AutoReq: no
AutoReqProv: no
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/ripe-dbase/whois_filt.pl
============================================================================
$ cvs diff -u -r1.1 -r1.2 whois_filt.pl
--- openpkg-src/ripe-dbase/whois_filt.pl 22 Mar 2004 17:46:32 -0000 1.1
+++ openpkg-src/ripe-dbase/whois_filt.pl 26 Mar 2004 15:42:28 -0000 1.2
@@ -3,7 +3,7 @@
#
# whois wrapper to filter out private objects and attributes
#
-# By Arnd Vehling, NetHead - 11/03/2004
+# Arnd Vehling, NetHead - 11/03/2004
#
# For Cable & Wireless Munic
#
@@ -25,24 +25,23 @@
# Glob Vars
#
- # Whois Server Definition
- my %ldb = ('Host' => '@l_hostname@', 'Port' => '43001',
- 'Mode' => 0);
+ # Where to write the pidfile. Specify "none" for none.
+ my $pidfile = '@l_prefix@/var/ripe-dbase/whois_filt.pid';
- my @header = (
- "% This is the Cable & Wireless Whois server.\n",
- "% The objects are in RPSL format.\n",
- "%\n",
- "% Rights restricted by copyright.\n\n"
- );
+ my $header = "% This is the Cable & Wireless Whois server.\n% The objects are in
RPSL format.\n%\n% Rights restricted by copyright.\n";
# Configuration file with private definitions
my $config="@l_prefix@/etc/ripe-dbase/whois_filt.config";
+
# All whois objects go into this
my @src_objects = ();
my @privates = ();
+ # Whois Server Definition
+ my %ldb = ('Host' => 'localhost', 'Port' => '43001',
+ 'Mode' => 0);
+
# Which source
my $local_source = "ARINCW";
@@ -106,8 +105,6 @@
print "Query error: $myerr\n";
exit 3;
}
-
- $source_whois->destroy();
}
##
@@ -158,8 +155,7 @@
&do_query( $query );
# Print header
- #map {($rc = printf $sock)} @header;
- $rc = printf $sock @header;
+ $rc = printf $sock $header;
if (!$rc) {
$self->Error("Client connection error %s",
@@ -193,7 +189,7 @@
}
$source =~ s/\n\n/\n/g;
- print("\n$source\n");
+ #print("\n$source\n");
$rc = printf $sock ("\n$source\n");
if (!$rc) {
@@ -225,7 +221,8 @@
package Main;
# Create Server
- my $server = cwho->new({'pidfile' => '@l_prefix@/var/ripe-dbase/whois_filt.pid',
'localport' => 43}, [EMAIL PROTECTED]);
+ my $server = cwho->new({'pidfile' => $pidfile,
+ 'localport' => 43}, [EMAIL PROTECTED]);
# Bind to address/port, run server
$server->Bind();
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]