Request 236 was acted upon.
_________________________________________________________________________
URL: https://rt.openpkg.org/id/236
Ticket: [OpenPKG #236]
Subject: CORE and BASE packages should use consistent %post restart logic
Requestors: [EMAIL PROTECTED]
Queue: openpkg
Owner: ms
Status: new
Transaction: Ticket creado por ms
Time: Jue. Ago. 14 12:14:32 2003
_________________________________________________________________________
CORE and BASE daemon packages should use the same %post restart logic as found in
PLUS, EVAL, and JUNK damon packages.
This protects against the hard to diagnose page swap segfault, which theoretically
could occur during installation while the daemon is running. However, it also ensures
a consistent approach across all daemon packages.
# correct restart procedure in .spec files
%pre
# before upgrade, save status and stop service
[ $1 -eq 2 ] || exit 0
eval `%{l_rc} FOO status 2>/dev/null | tee %{l_tmpfile}`
%{l_rc} FOO stop 2>/dev/null
exit 0
%post
if [ $1 -eq 2 ]; then
# after upgrade, restore status
eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}
[ ".$FOO_active" = .yes ] && %{l_rc} FOO start
fi
exit 0
%preun
# before erase, stop service and remove log files
[ $1 -eq 0 ] || exit 0
%{l_rc} FOO stop 2>/dev/null
rm -f $RPM_INSTALL_PREFIX/var/FOO/*.log* >/dev/null 2>&1 || true
exit 0
--
Michael Schloh v. Bennewitz
OpenPKG Developer
[EMAIL PROTECTED]
______________________________________________________________________
The OpenPKG Project www.openpkg.org
Bug Database Interface www.openpkg.org/bugdb
Bug Database List [EMAIL PROTECTED]