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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   18-Feb-2005 18:11:41
  Branch: HEAD                             Handle: 2005021817114100

  Modified files:
    openpkg-src/flowtools   flowtools.spec rc.flowtools

  Log:
    bless for PLUS class

  Summary:
    Revision    Changes     Path
    1.13        +2  -2      openpkg-src/flowtools/flowtools.spec
    1.6         +37 -16     openpkg-src/flowtools/rc.flowtools
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/flowtools/flowtools.spec
  ============================================================================
  $ cvs diff -u -r1.12 -r1.13 flowtools.spec
  --- openpkg-src/flowtools/flowtools.spec      16 Feb 2005 21:57:04 -0000      
1.12
  +++ openpkg-src/flowtools/flowtools.spec      18 Feb 2005 17:11:41 -0000      
1.13
  @@ -35,11 +35,11 @@
   Vendor:       Mark Fullmer
   Packager:     The OpenPKG Project
   Distribution: OpenPKG
  -Class:        EVAL
  +Class:        PLUS
   Group:        Network
   License:      BSD
   Version:      %{V_flowtools}
  -Release:      20050216
  +Release:      20050218
   
   #   package options
   %option       with_fsl   yes
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/flowtools/rc.flowtools
  ============================================================================
  $ cvs diff -u -r1.5 -r1.6 rc.flowtools
  --- openpkg-src/flowtools/rc.flowtools        16 Feb 2005 21:59:04 -0000      
1.5
  +++ openpkg-src/flowtools/rc.flowtools        18 Feb 2005 17:11:41 -0000      
1.6
  @@ -5,10 +5,13 @@
   
   %config
       flowtools_enable="$openpkg_rc_def"
  +    flowtools_fanout="no"
  +    flowtools_fanout_flags="-S5 -V5"
  +    flowtools_fanout_listen="127.0.0.1/0/4433 0/127.0.0.1/4434 
0/127.0.0.1/4435"
       flowtools_capture="no"
  -    flowtools_capture_flags="-V5 -N-1 -n95 -e665 -z4 -S5"
  -    flowtools_capture_workdir="@l_prefix@/var/flowtools/db"
  +    flowtools_capture_flags="-S5 -V5 -N-1 -n95 -e665 -z4"
       flowtools_capture_listen="127.0.0.1/0/4432"
  +    flowtools_capture_workdir="@l_prefix@/var/flowtools/db"
       flowtools_capture_log_prolog="true"
       flowtools_capture_log_epilog="true"
       flowtools_capture_log_numfiles="10"
  @@ -16,8 +19,12 @@
       flowtools_capture_log_complevel="9"
   
   %common
  -    flowtools_capture_logfile="@l_prefix@/var/flowtools/flowtools.log"
  -    flowtools_capture_pidfile="@l_prefix@/var/flowtools/flowtools.pid"
  +    flowtools_logfile="@l_prefix@/var/flowtools/flowtools.log"
  +    flowtools_fanout_pidfile="@l_prefix@/var/flowtools/flow-fanout.pid"
  +    flowtools_fanout_signal () {
  +        [ -f $flowtools_fanout_pidfile ] && kill -$1 `cat 
$flowtools_fanout_pidfile`
  +    }
  +    flowtools_capture_pidfile="@l_prefix@/var/flowtools/flow-capture.pid"
       flowtools_capture_signal () {
           [ -f $flowtools_capture_pidfile ] && kill -$1 `cat 
$flowtools_capture_pidfile`
       }
  @@ -25,6 +32,8 @@
   %status -u @l_rusr@ -o
       flowtools_usable="unknown"
       flowtools_active="no"
  +    rcService flowtools enable yes && rcVarIsYes flowtools_fanout && \
  +        flowtools_fanout_signal 0 && flowtools_active="yes"
       rcService flowtools enable yes && rcVarIsYes flowtools_capture && \
           flowtools_capture_signal 0 && flowtools_active="yes"
       echo "flowtools_enable=\"$flowtools_enable\""
  @@ -34,25 +43,37 @@
   %start -u @l_rusr@
       rcService flowtools enable yes || exit 0
       rcService flowtools active yes && exit 0
  -    rcVarIsYes flowtools_capture || exit 0
  -    eval @l_prefix@/bin/flow-capture \
  -        $flowtools_capture_flags \
  -        -p "$flowtools_capture_pidfile" \
  -        -w "$flowtools_capture_workdir" \
  -        "$flowtools_capture_listen"
  +    if rcVarIsYes flowtools_fanout; then
  +        eval @l_prefix@/bin/flow-fanout \
  +            $flowtools_fanout_flags \
  +            -p "$flowtools_fanout_pidfile" \
  +            "$flowtools_fanout_listen"
  +    fi
  +    if rcVarIsYes flowtools_capture; then
  +        eval @l_prefix@/bin/flow-capture \
  +            $flowtools_capture_flags \
  +            -p "$flowtools_capture_pidfile" \
  +            -w "$flowtools_capture_workdir" \
  +            "$flowtools_capture_listen"
  +    fi
   
   %stop -u @l_rusr@
       rcService flowtools enable yes || exit 0
       rcService flowtools active no  && exit 0
  -    rcVarIsYes flowtools_capture || exit 0
  -    flowtools_capture_signal TERM
  -    sleep 2
  -    rm -f $flowtools_capture_pidfile
  +    if rcVarIsYes flowtools_fanout; then
  +        flowtools_fanout_signal TERM
  +        sleep 2
  +        rm -f $flowtools_fanout_pidfile
  +    fi
  +    if rcVarIsYes flowtools_capture; then
  +        flowtools_capture_signal TERM
  +        sleep 2
  +        rm -f $flowtools_capture_pidfile
  +    fi
   
   %restart -u @l_rusr@
       rcService flowtools enable yes || exit 0
       rcService flowtools active no  && exit 0
  -    rcVarIsYes flowtools_capture || exit 0
       rc flowtools stop start
   
   %daily -u @l_rusr@
  @@ -64,5 +85,5 @@
           -z ${flowtools_capture_log_complevel} -m 644 -o @l_rusr@ -g @l_rgrp@ 
\
           -P "${flowtools_capture_log_prolog}" \
           -E "${flowtools_capture_log_epilog}; rc flowtools restart" \
  -        $flowtools_capture_logfile
  +        $flowtools_logfile
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to