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

  Server: cvs.openpkg.org                  Name:   Michael Schloh
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src openpkg-web          Date:   21-Oct-2003 20:01:18
  Branch: HEAD                             Handle: 2003102119011502

  Modified files:
    openpkg-src/gated       fsl.gated gated.spec rc.gated
    openpkg-web             news.txt

  Log:
    Repair log file permissions, implement ticket #202, and add common and
    status section to run commands

  Summary:
    Revision    Changes     Path
    1.3         +1  -1      openpkg-src/gated/fsl.gated
    1.38        +17 -3      openpkg-src/gated/gated.spec
    1.12        +19 -1      openpkg-src/gated/rc.gated
    1.7100      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/gated/fsl.gated
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 fsl.gated
  --- openpkg-src/gated/fsl.gated       14 Jul 2003 18:32:22 -0000      1.2
  +++ openpkg-src/gated/fsl.gated       21 Oct 2003 18:01:17 -0000      1.3
  @@ -9,7 +9,7 @@
       -> {
           debug: file(
               path="@l_prefix@/var/gated/gated.log",
  -            perm=0644
  +            perm=0644, monitor=3600
           )
       }
   };
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/gated/gated.spec
  ============================================================================
  $ cvs diff -u -r1.37 -r1.38 gated.spec
  --- openpkg-src/gated/gated.spec      22 Jul 2003 12:26:38 -0000      1.37
  +++ openpkg-src/gated/gated.spec      21 Oct 2003 18:01:17 -0000      1.38
  @@ -38,7 +38,7 @@
   Group:        Network
   License:      GPL
   Version:      %{V_here}
  -Release:      20030722
  +Release:      20031021
   
   #   package options
   %option       with_fsl  yes
  @@ -58,8 +58,8 @@
   BuildPreReq:  OpenPKG, openpkg >= 20030718, gcc, flex, bison
   PreReq:       OpenPKG, openpkg >= 20030718
   %if "%{with_fsl}" == "yes"
  -BuildPreReq:  fsl >= 1.2.0
  -PreReq:       fsl >= 1.2.0
  +BuildPreReq:  fsl >= 1.3.0
  +PreReq:       fsl >= 1.3.0
   %endif
   AutoReq:      no
   AutoReqProv:  no
  @@ -130,4 +130,18 @@
   
   %clean
       rm -rf $RPM_BUILD_ROOT
  +
  +%post
  +    #   after upgrade, restart service
  +    [ $1 -eq 2 ] || exit 0
  +    eval `%{l_rc} gated status 2>/dev/null`
  +    [ ".$gated_active" = .yes ] && %{l_rc} gated restart
  +    exit 0
  +
  +%preun
  +    #   before erase, stop service and remove log files
  +    [ $1 -eq 0 ] || exit 0
  +    %{l_rc} gated stop 2>/dev/null
  +    rm -f $RPM_INSTALL_PREFIX/var/gated/*.log* >/dev/null 2>&1 || true
  +    exit 0
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/gated/rc.gated
  ============================================================================
  $ cvs diff -u -r1.11 -r1.12 rc.gated
  --- openpkg-src/gated/rc.gated        22 Jul 2003 08:10:47 -0000      1.11
  +++ openpkg-src/gated/rc.gated        21 Oct 2003 18:01:17 -0000      1.12
  @@ -11,16 +11,34 @@
       gated_log_minsize="1M"
       gated_log_complevel="9"
   
  +%common
  +    gated_pidfile="@l_prefix@/var/gated/gated.pid"
  +    gated_signal () {
  +        [ -f $gated_pidfile ] && kill -$1 `cat $gated_pidfile`
  +    }
  +
  +%status -u @l_susr@ -o
  +    gated_usable="unknown"
  +    gated_active="no"
  +    rcService gated enable yes && \
  +        gated_signal 0 && gated_active="yes"
  +    echo "gated_enable=\"$gated_enable\""
  +    echo "gated_usable=\"$gated_usable\""
  +    echo "gated_active=\"$gated_active\""
  +
   %start -u @l_susr@
       rcService gated enable yes || exit 0
  +    rcService gated active yes && exit 0
       @l_prefix@/sbin/gdc start
   
   %stop -u @l_susr@
       rcService gated enable yes || exit 0
  +    rcService gated active no && exit 0
       @l_prefix@/sbin/gdc stop
   
   %restart -u @l_susr@
       rcService gated enable yes || exit 0
  +    rcService gated active no && exit 0
       @l_prefix@/sbin/gdc restart
   
   %daily -u @l_susr@
  @@ -29,7 +47,7 @@
       #   rotate logfile
       shtool rotate -f \
           -n ${gated_log_numfiles} -s ${gated_log_minsize} -d \
  -        -z ${gated_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 644 \
  +        -z ${gated_log_complevel} -o @l_susr@ -g @l_mgrp@ -m 644 \
           -P "${gated_log_prolog}" \
           -E "${gated_log_epilog}" \
           @l_prefix@/var/gated/gated.log
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.7099 -r1.7100 news.txt
  --- openpkg-web/news.txt      21 Oct 2003 16:37:20 -0000      1.7099
  +++ openpkg-web/news.txt      21 Oct 2003 18:01:15 -0000      1.7100
  @@ -1,3 +1,4 @@
  +21-Oct-2003: Upgraded package: P<gated-3.6-20031021>
   21-Oct-2003: Upgraded package: P<exim-4.24-20031021>
   21-Oct-2003: Upgraded package: P<dss-4.1.3-20031021>
   21-Oct-2003: Upgraded package: P<openpkg-20031021-20031021>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to