OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   18-Dec-2004 22:37:13
  Branch: HEAD                             Handle: 2004121821371200

  Added files:
    openpkg-src/flowscan    flowscan-apache.conf flowscan-cuflow.cf
                            flowscan-queue.sh flowscan.cf flowscan.patch
                            flowscan.spec rc.flowscan

  Log:
    new package: flowscan 1.006 (NetFlow Scanning and Graphing Frontend)

  Summary:
    Revision    Changes     Path
    1.1         +15 -0      openpkg-src/flowscan/flowscan-apache.conf
    1.1         +63 -0      openpkg-src/flowscan/flowscan-cuflow.cf
    1.1         +14 -0      openpkg-src/flowscan/flowscan-queue.sh
    1.1         +17 -0      openpkg-src/flowscan/flowscan.cf
    1.1         +78 -0      openpkg-src/flowscan/flowscan.patch
    1.1         +222 -0     openpkg-src/flowscan/flowscan.spec
    1.1         +57 -0      openpkg-src/flowscan/rc.flowscan
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/flowscan/flowscan-apache.conf
  ============================================================================
  $ cvs diff -u -r0 -r1.1 flowscan-apache.conf
  --- /dev/null 2004-12-18 22:37:13 +0100
  +++ flowscan-apache.conf      2004-12-18 22:37:13 +0100
  @@ -0,0 +1,15 @@
  +##  
  +##  flowscan-apache.conf -- Apache Configuration for Flowscan
  +##
  +
  +RewriteEngine on
  +
  +RewriteRule   ^/flowscan$ /openpkg-cgi/flowscan-cuflow.cgi [PT]
  +Alias         /flowscan/  @l_prefix@/var/flowscan/cuflow/web/
  +
  +<Directory @l_prefix@/var/flowscan/cuflow/web/>
  +    Options       +FollowSymLinks +Includes +Indexes
  +    AllowOverride None
  +    Allow         from all
  +</Directory>
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/flowscan/flowscan-cuflow.cf
  ============================================================================
  $ cvs diff -u -r0 -r1.1 flowscan-cuflow.cf
  --- /dev/null 2004-12-18 22:37:13 +0100
  +++ flowscan-cuflow.cf        2004-12-18 22:37:13 +0100
  @@ -0,0 +1,63 @@
  +##
  +##  flowscan-cuflow.cf -- flowscan(1) CUFlow reporter configuration
  +##
  +
  +#   the Round-Robin-Database (RRD) storage location
  +OutputDir @l_prefix@/var/flowscan/cuflow/rrd
  +
  +#   generate top N and over-time-average top N reports
  +Scoreboard     10 @l_prefix@/var/flowscan/cuflow/web               
@l_prefix@/var/flowscan/cuflow/web/topten.html
  +AggregateScore 10 @l_prefix@/var/flowscan/cuflow/web/aggregate.txt 
@l_prefix@/var/flowscan/cuflow/web/overall.html
  +
  +#   multicast tracking support
  +Multicast
  +
  +#   the NetFlow exporters
  +Router 192.168.0.1 router1.example.com
  +Router 192.168.0.2 router2.example.com
  +
  +#   subnets (to determine whether a packet is inbound our outbound)
  +Subnet 192.168.0.0/24
  +
  +#   track by networks
  +Network 192.168.0.0/24                example.com
  +Network 192.168.0.1/32,192.168.0.2/32 host.example.com
  +
  +#   track by services
  +Service 20-21/tcp                   ftp
  +Service 22/tcp                      ssh
  +Service 23/tcp                      telnet
  +Service 25/tcp                      smtp
  +Service 53/udp,53/tcp               dns
  +Service 69/udp                      tftp
  +Service 80/tcp                      http
  +Service 110/tcp                     pop3
  +Service 111/udp,111/tcp             sunrpc
  +Service 113/tcp                     ident
  +Service 119/tcp                     nntp
  +Service 123/udp,123/tcp             ntp
  +Service 142-143/tcp                 imap
  +Service 161-162/udp                 snmp
  +Service 389/tcp                     ldap
  +Service 443/tcp                     https
  +Service 514/udp                     syslog      
  +Service 540/tcp                     uucp      
  +Service 563/tcp                     nntps
  +Service 636/tcp                     ldaps
  +Service 873/tcp                     rsync
  +Service 989-990/tcp                 ftps
  +Service 993/tcp                     imaps
  +Service 995/tcp                     pop3s
  +Service 1645-1646/udp,1812-1813/udp radius
  +Service 194/tcp,6665-6669/tcp       irc
  +
  +#   track by protocols
  +Protocol 1   icmp
  +Protocol 6   tcp
  +Protocol 17  udp
  +Protocol 112 vrrp
  +
  +#   track by ToS
  +TOS 0     normal
  +TOS 1-255 other
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/flowscan/flowscan-queue.sh
  ============================================================================
  $ cvs diff -u -r0 -r1.1 flowscan-queue.sh
  --- /dev/null 2004-12-18 22:37:13 +0100
  +++ flowscan-queue.sh 2004-12-18 22:37:13 +0100
  @@ -0,0 +1,14 @@
  +#!/bin/sh
  +##
  +##  flowscan-queue -- flowscan(1) queuing helper
  +##
  +
  +for file in "$@"; do
  +    if [ ! -f $file ]; then
  +        echo "flowscan-queue: flow file \"$file\" not found" 1>&2
  +        continue
  +    fi
  +    cp $file @l_prefix@/var/flowscan/queue/
  +done
  +
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/flowscan/flowscan.cf
  ============================================================================
  $ cvs diff -u -r0 -r1.1 flowscan.cf
  --- /dev/null 2004-12-18 22:37:13 +0100
  +++ flowscan.cf       2004-12-18 22:37:13 +0100
  @@ -0,0 +1,17 @@
  +##
  +##  flowscan.cf -- flowscan(1) configuration
  +##
  +
  +#   global options
  +WaitSeconds 30
  +Verbose     1
  +
  +#   raw flow files to be processed
  +#   (uses "flowtools" files by default)
  +FlowFileGlob @l_prefix@/var/flowscan/queue/*
  +
  +#   list of FlowScan report classes
  +ReportClasses CUFlow
  +#ReportClasses CampusIO
  +#ReportClasses SubNetIO
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/flowscan/flowscan.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1 flowscan.patch
  --- /dev/null 2004-12-18 22:37:13 +0100
  +++ flowscan.patch    2004-12-18 22:37:13 +0100
  @@ -0,0 +1,78 @@
  +Index: flowscan.in
  +--- flowscan.in.orig 2001-02-16 22:17:31 +0100
  ++++ flowscan.in      2004-12-18 19:11:35 +0100
  +@@ -22,13 +22,13 @@
  + 
  + require 5.004; # for UNIVERSAL::can method
  + use FindBin;
  ++use lib $FindBin::Bin;
  + use Cflow qw(:flowvars 1.017);
  + use Benchmark;
  + use Getopt::Std;
  + use POSIX; # for strftime
  + use File::Basename;
  + use ConfigReader::DirectiveStyle;
  +-use lib $FindBin::Bin;
  + use FlowScan; # for mutt_mktime, etc.
  + 
  + '$Revision: 1.1 $' =~ m/(\d+)\.(\d+)/ && (( $VERSION ) = sprintf("%d.%03d", 
$1, $2));
  +Index: FlowScan.pm
  +--- FlowScan.pm.orig 2001-02-11 21:41:47 +0100
  ++++ FlowScan.pm      2004-12-18 20:01:03 +0100
  +@@ -15,7 +15,7 @@
  + #  along with this program; if not, write to the Free Software
  + #  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  + 
  +-# $Id: flowscan.patch,v 1.1 2004/12/18 21:37:12 rse Exp $
  ++# $Id: flowscan.patch,v 1.1 2004/12/18 21:37:12 rse Exp $
  + # Dave Plonka <[EMAIL PROTECTED]>
  + 
  + use strict;
  +@@ -29,7 +29,7 @@
  + @FlowScan::ISA=qw(Exporter);
  + @FlowScan::EXPORT_OK=qw(ip2name);
  + # convert the RCS revision to a reasonable Exporter VERSION:
  +-'$Revision: 1.1 $' =~ m/(\d+)\.(\d+)/ && (( $FlowScan::VERSION ) = 
sprintf("%d.%03d", $1, $2));
  ++'$Revision: 1.1 $' =~ m/(\d+)\.(\d+)/ && (( $FlowScan::VERSION ) = 
sprintf("%d.%03d", $1, $2));
  + 
  + =head1 NAME
  + 
  +@@ -93,7 +93,7 @@
  + sub file2time_t {
  +    my $file = shift;
  +    if ($file =~
  +-         m/(\d\d\d\d)(\d\d)(\d\d)_(\d\d):(\d\d):(\d\d)([+-])(\d\d)(\d\d)/) {
  ++             
m/(\d\d\d\d)-?(\d\d)-?(\d\d)[_.](\d\d):?(\d\d):?(\d\d)([+-])(\d\d)(\d\d)/) {
  +       # The file name contains an "hours east of GMT" component
  +       my(@tm) = ($6, $5, $4, $3, $2-1, $1-1900, 0, 0, -1);
  +       my($tm_sec, $tm_min, $tm_hour, $tm_mday, $tm_mon, $tm_year,
  +@@ -105,7 +105,7 @@
  +       }
  +       mutt_normalize_time(@tm);
  +       return mutt_mktime(@tm, -1, 0)
  +-   } elsif ($file =~ m/(\d\d\d\d)(\d\d)(\d\d)_(\d\d):(\d\d):(\d\d)$/) {
  ++   } elsif ($file =~ 
m/(\d\d\d\d)-?(\d\d)-?(\d\d)[_.](\d\d):?(\d\d):?(\d\d)$/) {
  +       # The file name contains just the plain old localtime
  +       return mutt_mktime($6, $5, $4, $3, $2-1, $1-1900, 0, 0, -1, 1)
  +    } else {
  +@@ -157,9 +157,9 @@
  +          RRA:AVERAGE:0:1:600
  +          RRA:AVERAGE:0:6:600
  +          RRA:AVERAGE:0:24:600
  +-         RRA:AVERAGE:0:288:732
  ++         RRA:AVERAGE:0:288:1827
  +          RRA:MAX:0:24:600
  +-         RRA:MAX:0:288:732
  ++         RRA:MAX:0:288:1827
  +      )
  +       );
  +    my $err=RRDs::error;
  +@@ -190,7 +190,7 @@
  + 
  + =head1 VERSION
  + 
  +-The version number is the module file RCS revision number (B<$Revision: 1.1 
$>)
  ++The version number is the module file RCS revision number (B<$Revision: 1.1 
$>)
  + with the minor number printed right justified with leading zeroes to 3
  + decimal places.  For instance, RCS revision 1.1 would yield a package 
version
  + number of 1.001.
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/flowscan/flowscan.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 flowscan.spec
  --- /dev/null 2004-12-18 22:37:13 +0100
  +++ flowscan.spec     2004-12-18 22:37:13 +0100
  @@ -0,0 +1,222 @@
  +##
  +##  flowscan.spec -- OpenPKG RPM Specification
  +##  Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  +##  Copyright (c) 2000-2004 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +##  Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  +##
  +##  Permission to use, copy, modify, and distribute this software for
  +##  any purpose with or without fee is hereby granted, provided that
  +##  the above copyright notice and this permission notice appear in all
  +##  copies.
  +##
  +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  +##  SUCH DAMAGE.
  +##
  +
  +#   package versions
  +%define       V_flowscan     1.006
  +%define       V_cuflow       1.5
  +%define       V_configreader 0.5
  +
  +#   package information
  +Name:         flowscan
  +Summary:      NetFlow Scanning and Graphing Frontend
  +URL:          http://net.doit.wisc.edu/~plonka/FlowScan/
  +Vendor:       Dave Plonka
  +Packager:     The OpenPKG Project
  +Distribution: OpenPKG
  +Class:        EVAL
  +Group:        Network
  +License:      GPL
  +Version:      %{V_flowscan}
  +Release:      20041218
  +
  +#   list of sources
  +Source0:      
http://net.doit.wisc.edu/~plonka/FlowScan/FlowScan-%{V_flowscan}.tar.gz
  +Source1:      
http://www.columbia.edu/acis/networks/advanced/CUFlow/CUFlow-%{V_cuflow}.tgz
  +Source2:      
http://www.cpan.org/modules/by-module/ConfigReader/ConfigReader-%{V_configreader}.tar.gz
  +Source3:      rc.flowscan
  +Source4:      flowscan-apache.conf
  +Source5:      flowscan-cuflow.cf
  +Source6:      flowscan-queue.sh
  +Source7:      flowscan.cf
  +Patch0:       flowscan.patch
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20040130, perl-openpkg
  +PreReq:       OpenPKG, openpkg >= 20040130
  +BuildPreReq:  perl, perl-net, perl-xml, perl-sys, perl-crypto, perl-www
  +PreReq:       perl, perl-net, perl-xml, perl-sys, perl-crypto, perl-www
  +BuildPreReq:  rrdtool, flowtools, flowtools::with_perl = yes
  +PreReq:       rrdtool, flowtools, flowtools::with_perl = yes
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    FlowScan analyzes and reports on Internet Protocol (IP) flow data
  +    exported by network components. FlowScan binds together a NetFlow
  +    collection engine, a high performance database, and a visualization
  +    tool. FlowScan produces graph images that provide a continuous, near
  +    real-time view of the network traffic.
  +
  +%track
  +    prog flowscan = {
  +        version   = %{V_flowscan}
  +        url       = http://net.doit.wisc.edu/~plonka/FlowScan/
  +        regex     = FlowScan-(__VER__)\.tar\.gz
  +    }
  +    prog flowscan:cuflow = {
  +        version   = %{V_cuflow}
  +        url       = http://www.columbia.edu/acis/networks/advanced/CUFlow/
  +        regex     = CUFlow-(__VER__)\.tgz
  +    }
  +    prog flowscan:configreader = {
  +        version   = %{V_configreader}
  +        url       = http://www.cpan.org/modules/by-module/ConfigReader/
  +        regex     = ConfigReader-(__VER__)\.tar\.gz
  +    }
  +
  +%prep
  +    %setup -q -c
  +    %setup -q -D -T -a 1
  +    %setup -q -D -T -a 2
  +    %patch -p0 -d FlowScan-%{V_flowscan}
  +
  +%build
  +
  +%install
  +    #   create installation hierarchy
  +    rm -rf $RPM_BUILD_ROOT
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/bin \
  +        $RPM_BUILD_ROOT%{l_prefix}/cgi \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan \
  +        $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/ConfigReader \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/flowscan/queue \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/flowscan/cuflow/rrd \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/flowscan/cuflow/web \
  +        $RPM_BUILD_ROOT%{l_prefix}/man/man1
  +
  +    #   install ConfigReader module
  +    ( cd ConfigReader-%{V_configreader}
  +      %{l_shtool} install -c -m 644 \
  +          ConfigReader.pod $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
  +      %{l_shtool} install -c -m 644 \
  +          DirectiveStyle.pm Spec.pm Values.pm \
  +          $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/ConfigReader/
  +    ) || exit $?
  +
  +    #   install FlowScan components
  +    ( cd FlowScan-%{V_flowscan}
  +      perllib=$RPM_BUILD_ROOT%{l_prefix}/lib/flowscan \
  +      ./configure --prefix=%{l_prefix}
  +      %{l_shtool} install -c -m 755 \
  +          -e 's;use lib $FindBin::Bin;use lib "%{l_prefix}/lib/flowscan";' \
  +          -e 
's;..FindBin::Bin./..FindBin::Script.\.cf;%{l_prefix}/etc/flowscan/flowscan.cf;'
 \
  +          flowscan $RPM_BUILD_ROOT%{l_prefix}/bin/
  +      %{l_shtool} install -c -m 755 \
  +          util/ip2hostname $RPM_BUILD_ROOT%{l_prefix}/bin/
  +      %{l_shtool} install -c -m 644 \
  +          FlowScan.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
  +      %{l_shtool} install -c -m 644 \
  +          -e 
's;..FindBin::Bin./CampusIO\.cf;%{l_prefix}/etc/flowscan/flowscan-campusio.cf;' 
\
  +          CampusIO.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
  +      %{l_shtool} install -c -m 644 \
  +          -e 
's;..FindBin::Bin./SubNetIO\.cf;%{l_prefix}/etc/flowscan/flowscan-subnetio.cf;' 
\
  +          SubNetIO.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
  +      %{l_shtool} install -c -m 644 %{l_value -s -a} \
  +          %{SOURCE flowscan.cf} $RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/
  +      %{l_shtool} install -c -m 644 \
  +          cf/SubNetIO.cf 
$RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/flowscan-subnetio.cf
  +      %{l_shtool} install -c -m 644 \
  +          cf/CampusIO.cf 
$RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/flowscan-campusio.cf
  +    ) || exit $?
  +
  +    #   install CUFlow reporting plugin
  +    ( cd CUFlow-%{V_cuflow}
  +      %{l_shtool} install -c -m 644 \
  +          -e 
's;..FindBin::Bin./CUFlow\.cf;%{l_prefix}/etc/flowscan/flowscan-cuflow.cf;' \
  +          CUFlow.pm $RPM_BUILD_ROOT%{l_prefix}/lib/flowscan/
  +      %{l_shtool} install -c -m 644 %{l_value -s -a} \
  +          %{SOURCE flowscan-cuflow.cf} 
$RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/
  +      %{l_shtool} install -c -m 755 \
  +          -e 's;#! /usr/bin/perl -w;#!%{l_prefix}/bin/perl;' \
  +          -e 's;/cflow/reports/rrds;%{l_prefix}/var/flowscan/cuflow/rrd;' \
  +          -e 's;Estimated Columbia University Campus;OpenPKG;' \
  +          CUGrapher.pl $RPM_BUILD_ROOT%{l_prefix}/cgi/flowscan-cuflow.cgi
  +    ) || exit $?
  +
  +    #   install queuing program
  +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
  +        %{SOURCE flowscan-queue.sh} 
$RPM_BUILD_ROOT%{l_prefix}/bin/flowscan-queue
  +
  +    #   install Apache configuration
  +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
  +        %{SOURCE flowscan-apache.conf} 
$RPM_BUILD_ROOT%{l_prefix}/etc/flowscan/
  +
  +    #   install run-command script
  +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
  +        %{SOURCE rc.flowscan} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  +
  +    #   determine installation files
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  +        %{l_files_std} \
  +        '%config %{l_prefix}/etc/flowscan/*' \
  +        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/flowscan' \
  +        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/flowscan/*' \
  +        '%attr(1777,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/flowscan/queue'
  +
  +%files -f files
  +
  +%clean
  +    rm -rf $RPM_BUILD_ROOT
  +
  +%post
  +    if [ ".$1" = .1 ]; then
  +        #   add hook to Apache configuration
  +        apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
  +        if [ -f $apacheconf ]; then
  +            ( echo "Include 
$RPM_INSTALL_PREFIX/etc/flowscan/flowscan-apache.conf"
  +            ) | $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
  +                    -a -i "$RPM_INSTALL_PREFIX:flowscan" $apacheconf
  +        fi
  +    fi
  +    #   after upgrade, restart service
  +    [ $1 -eq 2 ] || exit 0
  +    eval `%{l_rc} flowscan status 2>/dev/null`
  +    [ ".$flowscan_active" = .yes ] && %{l_rc} flowscan restart
  +    exit 0
  +
  +%preun
  +    #   before erase, stop service and remove log files
  +    [ $1 -eq 0 ] || exit 0
  +    %{l_rc} flowscan stop 2>/dev/null
  +    rm -f  $RPM_INSTALL_PREFIX/var/flowscan/flowscan.*   >/dev/null 2>&1 || 
true
  +    rm -rf $RPM_INSTALL_PREFIX/var/flowscan/queue/*      >/dev/null 2>&1 || 
true
  +    rm -rf $RPM_INSTALL_PREFIX/var/flowscan/cuflow/rrd/* >/dev/null 2>&1 || 
true
  +    rm -rf $RPM_INSTALL_PREFIX/var/flowscan/cuflow/web/* >/dev/null 2>&1 || 
true
  +    exit 0
  +
  +%postun
  +    if [ ".$1" = .0 ]; then
  +        #   remove hook from Apache configuration
  +        apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
  +        if [ -f $apacheconf ]; then
  +            $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
  +                -r -i "$RPM_INSTALL_PREFIX:flowscan" $apacheconf
  +        fi
  +    fi
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/flowscan/rc.flowscan
  ============================================================================
  $ cvs diff -u -r0 -r1.1 rc.flowscan
  --- /dev/null 2004-12-18 22:37:13 +0100
  +++ rc.flowscan       2004-12-18 22:37:13 +0100
  @@ -0,0 +1,57 @@
  [EMAIL PROTECTED]@/lib/openpkg/bash @l_prefix@/etc/rc
  +##
  +##  rc.flowscan -- Run-Commands
  +##
  +
  +%config
  +    flowscan_enable="$openpkg_rc_def"
  +    flowscan_log_prolog="true"
  +    flowscan_log_epilog="true"
  +    flowscan_log_numfiles="10"
  +    flowscan_log_minsize="1M"
  +    flowscan_log_complevel="9"
  +
  +%common
  +    flowscan_logfile="@l_prefix@/var/flowscan/flowscan.log"
  +    flowscan_pidfile="@l_prefix@/var/flowscan/flowscan.pid"
  +    flowscan_signal () {
  +        [ -f $flowscan_pidfile ] && kill -$1 `cat $flowscan_pidfile`
  +    }
  +
  +%status -u @l_rusr@ -o
  +    flowscan_usable="unknown"
  +    flowscan_active="no"
  +    rcService flowscan enable yes && \
  +        flowscan_signal 0 && flowscan_active="yes"
  +    echo "flowscan_enable=\"$flowscan_enable\""
  +    echo "flowscan_usable=\"$flowscan_usable\""
  +    echo "flowscan_active=\"$flowscan_active\""
  +
  +%start -u @l_rusr@
  +    rcService flowscan enable yes || exit 0
  +    rcService flowscan active yes && exit 0
  +    ( nohup @l_prefix@/bin/flowscan >>$flowscan_logfile 2>&1 </dev/null &
  +      echo $! >$flowscan_pidfile
  +    ) >/dev/null 2>&1
  +
  +%stop -u @l_rusr@
  +    rcService flowscan enable yes || exit 0
  +    rcService flowscan active no && exit 0
  +    flowscan_signal TERM
  +    sleep 2
  +    rm -f $flowscan_pidfile 2>/dev/null || true
  +
  +%restart -u @l_rusr@
  +    rcService flowscan enable yes || exit 0
  +    rcService flowscan active no && exit 0
  +    rc flowscan stop start
  +
  +%daily -u @l_rusr@
  +    rcService flowscan enable yes || exit 0
  +    shtool rotate -f \
  +        -n ${flowscan_log_numfiles} -s ${flowscan_log_minsize} -d \
  +        -z ${flowscan_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 644 \
  +        -P "${flowscan_log_prolog}" \
  +        -E "${flowscan_log_epilog}; rc flowscan restart" \
  +        $flowscan_logfile
  +
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to