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

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   22-Jul-2003 17:48:26
  Branch: HEAD                             Handle: 2003072216482500

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

  Log:
    PR#202 run-time check and related issues (unfinished)

  Summary:
    Revision    Changes     Path
    1.78        +15 -3      openpkg-src/inn/inn.spec
    1.18        +7  -3      openpkg-src/inn/rc.inn
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/inn/inn.spec
  ============================================================================
  $ cvs diff -u -r1.77 -r1.78 inn.spec
  --- openpkg-src/inn/inn.spec  22 Jul 2003 08:10:49 -0000      1.77
  +++ openpkg-src/inn/inn.spec  22 Jul 2003 15:48:25 -0000      1.78
  @@ -232,8 +232,7 @@
           '%attr(775,%{l_musr},%{l_rgrp}) %{l_prefix}/var/inn/log' \
           '%attr(775,%{l_musr},%{l_rgrp}) %{l_prefix}/var/inn/run' \
           '%attr(775,%{l_musr},%{l_rgrp}) %{l_prefix}/var/inn/spool' \
  -        '%attr(775,%{l_musr},%{l_rgrp}) %{l_prefix}/var/inn/tmp' \
  -        '%config %{l_prefix}/var/inn/db/*'
  +        '%attr(775,%{l_musr},%{l_rgrp}) %{l_prefix}/var/inn/tmp'
   
   %files -f files
   
  @@ -241,8 +240,21 @@
       rm -rf $RPM_BUILD_ROOT
   
   %post
  +    #   after install, create history db as restricted user
       if [ $1 -eq 1 ]; then
  -        #   create history db as restricted user
           su - %{l_rusr} -c "$RPM_INSTALL_PREFIX/libexec/inn/makedbz -i -o"
       fi
  +
  +    #   after upgrade, restart service
  +    [ $1 -eq 2 ] || exit 0
  +    eval `%{l_rc} inn status 2>/dev/null`
  +    [ ".$inn_active" = .yes ] && %{l_rc} inn restart
  +    exit 0
  +
  +%preun
  +    #   before erase, stop service and remove log files
  +    [ $1 -eq 0 ] || exit 0
  +    %{l_rc} inn stop 2>/dev/null
  +    rm -f $RPM_INSTALL_PREFIX/var/inn/inn.log* >/dev/null 2>&1 || true
  +    exit 0
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/inn/rc.inn
  ============================================================================
  $ cvs diff -u -r1.17 -r1.18 rc.inn
  --- openpkg-src/inn/rc.inn    22 Jul 2003 08:10:49 -0000      1.17
  +++ openpkg-src/inn/rc.inn    22 Jul 2003 15:48:25 -0000      1.18
  @@ -17,24 +17,28 @@
   
   %start -u @l_rusr@
       rcService inn enable yes || exit 0
  +    rcService inn active yes && exit 0
       @l_prefix@/libexec/inn/rc.news
   
   %stop -u @l_rusr@
       rcService inn enable yes || exit 0
  +    rcService inn active no  && exit 0
       @l_prefix@/libexec/inn/rc.news stop
  +    sleep 2
   
   %restart -u @l_rusr@
       rcService inn enable yes || exit 0
  -    @l_prefix@/libexec/inn/rc.news stop
  -    sleep 2
  -    @l_prefix@/libexec/inn/rc.news
  +    rcService inn active no  && exit 0
  +    rc inn stop start
   
   %reload -u @l_rusr@
       rcService inn enable yes || exit 0
  +    rcService inn active no  && exit 0
       @l_prefix@/bin/ctlinnd reload all rc.inn:reload
   
   %quarterly -u @l_rusr@
       rcService inn enable yes || exit 0
  +    rcService inn active yes && exit 0
       rcService inn_nntpsend enable yes && @l_prefix@/bin/nntpsend || true
   
   %daily -u @l_rusr@
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to