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:   17-Dec-2004 23:26:30
  Branch: HEAD                             Handle: 2004121722262900

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

  Log:
    do not append the port to the pidfile automatically and remove the
    pidfile after stopping

  Summary:
    Revision    Changes     Path
    1.4         +34 -0      openpkg-src/flowtools/flowtools.patch
    1.2         +1  -0      openpkg-src/flowtools/rc.flowtools
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/flowtools/flowtools.patch
  ============================================================================
  $ cvs diff -u -r1.3 -r1.4 flowtools.patch
  --- openpkg-src/flowtools/flowtools.patch     17 Dec 2004 18:54:38 -0000      
1.3
  +++ openpkg-src/flowtools/flowtools.patch     17 Dec 2004 22:26:29 -0000      
1.4
  @@ -80,6 +80,40 @@
    
        } /* if FD_ISSET */
    
  +Index: flow-tools-0.67/lib/support.c
  +--- flow-tools-0.67/lib/support.c.orig       2003-02-13 03:38:43 +0100
  ++++ flow-tools-0.67/lib/support.c    2004-12-17 23:17:21 +0100
  +@@ -500,26 +500,19 @@
  + int write_pidfile(int pid, char *file, u_int16 port)
  + {
  +   int fd, len;
  +-  char str[16], *c;
  ++  char str[16];
  +   
  +-  if (!(c = (char*)malloc(strlen(file)+16)))
  +-    return -1;
  +-
  +-  sprintf(c, "%s.%d", file, (int)port);
  +-    
  +   len = sprintf(str, "%u\n", (unsigned)pid);
  + 
  +-  if ((fd = open(c, O_WRONLY|O_CREAT|O_TRUNC, 0644)) < 0 ) {
  +-    fterr_warn("open(%s)", c);
  +-    free (c);
  ++  if ((fd = open(file, O_WRONLY|O_CREAT|O_TRUNC, 0644)) < 0 ) {
  ++    fterr_warn("open(%s)", file);
  +     return -1; 
  +   }
  + 
  + 
  +   if (write(fd, str, len) != len) {
  +-    fterr_warn("write(%s)", c);
  ++    fterr_warn("write(%s)", file);
  +     close (fd);
  +-    free (c);
  +     return -1;
  +   }
  + 
   Index: flowextract-2.5/grammar.y
   --- flowextract-2.5/grammar.y.orig   2003-04-28 20:22:02 +0200
   +++ flowextract-2.5/grammar.y        2004-12-17 16:40:36 +0100
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/flowtools/rc.flowtools
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 rc.flowtools
  --- openpkg-src/flowtools/rc.flowtools        17 Dec 2004 18:54:38 -0000      
1.1
  +++ openpkg-src/flowtools/rc.flowtools        17 Dec 2004 22:26:29 -0000      
1.2
  @@ -47,6 +47,7 @@
       rcVarIsYes flowtools_capture || exit 0
       flowtools_capture_signal TERM
       sleep 2
  +    rm -f $flowtools_capture_pidfile
   
   %restart -u @l_rusr@
       rcService flowtools enable yes || exit 0
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to