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-Dec-2003 10:31:16 Branch: HEAD Handle: 2003120809311600 Modified files: openpkg-src/cacti cacti.spec Log: add missing pre/post install run command logic Summary: Revision Changes Path 1.8 +11 -3 openpkg-src/cacti/cacti.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/cacti/cacti.spec ============================================================================ $ cvs diff -u -r1.7 -r1.8 cacti.spec --- openpkg-src/cacti/cacti.spec 5 Dec 2003 15:32:23 -0000 1.7 +++ openpkg-src/cacti/cacti.spec 8 Dec 2003 09:31:16 -0000 1.8 @@ -33,7 +33,7 @@ Group: Database License: GPL Version: 0.8.4 -Release: 20031205 +Release: 20031208 # list of sources Source0: http://www.raxnet.net/downloads/cacti-%{version}.tar.gz @@ -191,10 +191,18 @@ echo " password to a custom one." ) | %{l_rpmtool} msg -b -t notice fi + if [ $1 -eq 2 ]; then + # after upgrade, restart service + eval `%{l_rc} cacti status 2>/dev/null` + [ ".$cacti_active" = .yes ] && %{l_rc} cacti restart + fi + exit 0 %preun if [ $1 -eq 0 ]; then - # remove generated logfiles - rm -f $RPM_INSTALL_PREFIX/var/cacti/log/* + # before erase, stop service and remove log files + %{l_rc} cacti stop 2>/dev/null + rm -f $RPM_INSTALL_PREFIX/var/cacti/log/* >/dev/null 2>&1 || true fi + exit 0 @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]