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

  Server: cvs.openpkg.org                  Name:   Michael Schloh
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   09-Sep-2003 21:01:11
  Branch: HEAD                             Handle: 2003090920011000

  Modified files:
    openpkg-src/tftp        tftp.spec

  Log:
    Add forgotten pre post preun sections to satisfy ticket #202

  Summary:
    Revision    Changes     Path
    1.31        +22 -0      openpkg-src/tftp/tftp.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/tftp/tftp.spec
  ============================================================================
  $ cvs diff -u -r1.30 -r1.31 tftp.spec
  --- openpkg-src/tftp/tftp.spec        9 Sep 2003 18:33:34 -0000       1.30
  +++ openpkg-src/tftp/tftp.spec        9 Sep 2003 19:01:10 -0000       1.31
  @@ -120,3 +120,25 @@
   %clean
       rm -rf $RPM_BUILD_ROOT
   
  +%pre
  +    #   before upgrade, save status and stop service
  +    [ $1 -eq 2 ] || exit 0
  +    eval `%{l_rc} tftp status 2>/dev/null | tee %{l_tmpfile}`
  +    %{l_rc} tfp stop 2>/dev/null
  +    exit 0
  +
  +%post
  +    if [ $1 -eq 2 ]; then
  +        #   after upgrade, restore status
  +        eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}
  +        [ ".$tftp_active" = .yes ] && %{l_rc} tftp start
  +    fi
  +    exit 0
  +
  +%preun
  +    #   before erase, stop service and remove log files
  +    [ $1 -eq 0 ] || exit 0
  +    %{l_rc} tftp stop 2>/dev/null
  +    rm -f $RPM_INSTALL_PREFIX/var/tftp/*.log* >/dev/null 2>&1 || true
  +    exit 0
  +
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to