OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael Schloh
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web Date: 14-Aug-2003 16:11:58
Branch: HEAD Handle: 2003081415115503
Modified files:
openpkg-src/bind8 bind8.spec rc.bind8
openpkg-web news.txt
Log:
Complete for compliance with features described by ticket #202
Summary:
Revision Changes Path
1.38 +18 -14 openpkg-src/bind8/bind8.spec
1.8 +12 -3 openpkg-src/bind8/rc.bind8
1.6175 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/bind8/bind8.spec
============================================================================
$ cvs diff -u -r1.37 -r1.38 bind8.spec
--- openpkg-src/bind8/bind8.spec 23 Jul 2003 13:54:20 -0000 1.37
+++ openpkg-src/bind8/bind8.spec 14 Aug 2003 14:11:58 -0000 1.38
@@ -33,7 +33,7 @@
Group: DNS
License: GPL
Version: 8.4.1
-Release: 20030723
+Release: 20030814
# list of sources
Source0: ftp://ftp.isc.org/isc/bind/src/%{version}/bind-src.tar.gz
@@ -153,20 +153,24 @@
rm -rf $RPM_BUILD_ROOT
%pre
- if [ $1 -gt 1 ]; then
- # stop daemon before any upgrade
- ls >/dev/null 2>&1 $RPM_INSTALL_PREFIX/var/bind/ndc \
- && $RPM_INSTALL_PREFIX/sbin/ndc stop >/dev/null 2>&1 \
- || true
+ # before upgrade, save status and stop service
+ [ $1 -eq 2 ] || exit 0
+ eval `%{l_rc} bind8 status 2>/dev/null | tee %{l_tmpfile}`
+ %{l_rc} bind8 stop 2>/dev/null
+ exit 0
+
+%post
+ if [ $1 -eq 2 ]; then
+ # after upgrade, restore status
+ eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}
+ [ ".$bind8_active" = .yes ] && %{l_rc} bind8 start
fi
+ exit 0
%preun
- if [ $1 -eq 0 ]; then
- # stop daemon before removing package
- ls >/dev/null 2>&1 $RPM_INSTALL_PREFIX/var/bind/ndc \
- && $RPM_INSTALL_PREFIX/sbin/ndc stop >/dev/null 2>&1 \
- || true
- # remove dynamically generated files
- rm -f $RPM_INSTALL_PREFIX/var/bind/*
- fi
+ # before erase, stop service and remove log files
+ [ $1 -eq 0 ] || exit 0
+ %{l_rc} bind8 stop 2>/dev/null
+ rm -f $RPM_INSTALL_PREFIX/var/bind/*.log.* >/dev/null 2>&1 || true
+ exit 0
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/bind8/rc.bind8
============================================================================
$ cvs diff -u -r1.7 -r1.8 rc.bind8
--- openpkg-src/bind8/rc.bind8 22 Jul 2003 08:10:40 -0000 1.7
+++ openpkg-src/bind8/rc.bind8 14 Aug 2003 14:11:58 -0000 1.8
@@ -5,6 +5,8 @@
%config
bind8_enable="$openpkg_rc_def"
+ bind8_log_prolog="true"
+ bind8_log_epilog="true"
bind8_log_numfiles="5"
bind8_log_minsize="512K"
bind8_log_complevel="9"
@@ -19,25 +21,32 @@
%start -p 100 -u @l_susr@
rcService bind8 enable yes || exit 0
+ rcService bind8 active yes && exit 0
@l_prefix@/sbin/ndc start
%stop -p 100 -u @l_susr@
rcService bind8 enable yes || exit 0
+ rcService bind8 active no && exit 0
@l_prefix@/sbin/ndc stop
%restart -p 100 -u @l_susr@
rcService bind8 enable yes || exit 0
+ rcService bind8 active no && exit 0
@l_prefix@/sbin/ndc restart
%reload -p 100 -u @l_susr@
rcService bind8 enable yes || exit 0
+ rcService bind8 active no && exit 0
@l_prefix@/sbin/ndc reload
%daily -u @l_susr@
rcService bind8 enable yes || exit 0
+
+ # rotate logfile
shtool rotate -f \
- -n ${bind8_log_numfiles} -s ${bind8_log_minsize} \
- -d -z ${bind8_log_complevel} -o @l_musr@ -o @l_mgrp@ -m 644 \
- -E '@l_prefix@/sbin/ndc restart | grep -v "new pid is"' \
+ -n ${bind8_log_numfiles} -s ${bind8_log_minsize} -d \
+ -z ${bind8_log_complevel} -o @l_susr@ -o @l_mgrp@ -m 644 \
+ -P "${bind8_log_prolog}" \
+ -E "${bind8_log_epilog} && rc bind8 restart" \
@l_prefix@/var/bind/named.log
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.6174 -r1.6175 news.txt
--- openpkg-web/news.txt 14 Aug 2003 13:58:03 -0000 1.6174
+++ openpkg-web/news.txt 14 Aug 2003 14:11:55 -0000 1.6175
@@ -1,3 +1,4 @@
+14-Aug-2003: Upgraded package: P<bind8-8.4.1-20030814>
14-Aug-2003: Upgraded package: P<tightvnc-1.2.9-20030814>
14-Aug-2003: Upgraded package: P<icewm-1.2.10-20030814>
14-Aug-2003: Upgraded package: P<postfix-2.0.14-20030814>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]