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: 08-Aug-2003 16:22:55
Branch: HEAD Handle: 2003080815225400
Modified files:
openpkg-src/imapd imapd.spec
Log:
Complete for compliance with features described by ticket #202
Summary:
Revision Changes Path
1.93 +21 -1 openpkg-src/imapd/imapd.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/imapd/imapd.spec
============================================================================
$ cvs diff -u -r1.92 -r1.93 imapd.spec
--- openpkg-src/imapd/imapd.spec 6 Aug 2003 16:05:17 -0000 1.92
+++ openpkg-src/imapd/imapd.spec 8 Aug 2003 14:22:54 -0000 1.93
@@ -33,7 +33,7 @@
Group: Mail
License: BSD
Version: 2.1.14
-Release: 20030806
+Release: 20030808
# package options
%option with_fsl yes
@@ -239,6 +239,26 @@
'%dir %attr(0750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/imapd/*' \
'%dir %attr(0770,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/imapd/*/*' \
'%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/imapd/socket'
+%pre
+ # before upgrade, save status and stop service
+ [ $1 -eq 2 ] || exit 0
+ eval `%{l_rc} imapd status 2>/dev/null | tee %{l_tmpfile}`
+ %{l_rc} imapd stop 2>/dev/null
+ exit 0
+
+%post
+ if [ $1 -eq 2 ]; then
+ # after upgrade, restore status
+ eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}
+ [ ".$imapd_active" = .yes ] && %{l_rc} imapd start
+ fi
+ exit 0
+
+%preun
+ # before erase, stop service and remove log files
+ [ $1 -eq 0 ] || exit 0
+ %{l_rc} imapd stop 2>/dev/null
+ exit 0
%files -f files
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]