OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web Date: 19-Jul-2003 12:21:26
Branch: HEAD Handle: 2003071911212402
Modified files:
openpkg-src/zebra rc.zebra zebra.spec
openpkg-web news.txt
Log:
cleanup run-commands, add %status, add logfile rotation, etc
Summary:
Revision Changes Path
1.10 +46 -29 openpkg-src/zebra/rc.zebra
1.39 +4 -4 openpkg-src/zebra/zebra.spec
1.5663 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/zebra/rc.zebra
============================================================================
$ cvs diff -u -r1.9 -r1.10 rc.zebra
--- openpkg-src/zebra/rc.zebra 17 Jul 2003 21:35:20 -0000 1.9
+++ openpkg-src/zebra/rc.zebra 19 Jul 2003 10:21:26 -0000 1.10
@@ -6,41 +6,58 @@
%config
zebra_enable="$openpkg_rc_def"
zebra_protocols="rip ospf bgp"
+ zebra_log_prolog="true"
+ zebra_log_epilog="true"
+ zebra_log_numfiles="10"
+ zebra_log_minsize="1M"
+ zebra_log_complevel="9"
-%common
- zebra_start () {
- ( cd @l_prefix@/etc/zebra
- @l_prefix@/sbin/zebra -d
- for protocol in $zebra_protocols; do
- if [ -f @l_prefix@/sbin/${protocol}d ]; then
- @l_prefix@/sbin/${protocol}d -d
- fi
- done
- @l_prefix@/bin/vtysh -b
- )
- }
- zebra_stop () {
- if [ -f @l_prefix@/var/zebra/zebra.pid ]; then
- kill -TERM `cat @l_prefix@/var/zebra/zebra.pid` >/dev/null 2>&1 || true
+%status -u @l_susr@ -o
+ zebra_usable="unknown"
+ zebra_active="no"
+ if [ -f @l_prefix@/var/zebra/zebra.pid ]; then
+ kill -0 `cat @l_prefix@/var/zebra/zebra.pid` >/dev/null 2>&1 || true
+ if [ $? -eq 0 ]; then
+ zebra_active="yes"
fi
- for protocol in $zebra_protocols; do
- if [ -f @l_prefix@/var/zebra/${protocol}d.pid ]; then
- kill -TERM `cat @l_prefix@/var/zebra/${protocol}d.pid` >/dev/null
2>&1 || true
- fi
- done
- }
+ fi
+ echo "zebra_enable=\"$zebra_enable\""
+ echo "zebra_usable=\"$zebra_usable\""
+ echo "zebra_active=\"$zebra_active\""
%start -p 200 -u @l_susr@
- opService zebra enable yes || exit 0
- zebra_start
+ rcService zebra enable yes || exit 0
+ cd @l_prefix@/etc/zebra
+ @l_prefix@/sbin/zebra -d
+ for protocol in $zebra_protocols; do
+ if [ -f @l_prefix@/sbin/${protocol}d ]; then
+ @l_prefix@/sbin/${protocol}d -d
+ fi
+ done
+ @l_prefix@/bin/vtysh -b
%stop -p 200 -u @l_susr@
- opService zebra enable yes || exit 0
- zebra_stop
+ rcService zebra enable yes || exit 0
+ if [ -f @l_prefix@/var/zebra/zebra.pid ]; then
+ kill -TERM `cat @l_prefix@/var/zebra/zebra.pid` >/dev/null 2>&1 || true
+ fi
+ for protocol in $zebra_protocols; do
+ if [ -f @l_prefix@/var/zebra/${protocol}d.pid ]; then
+ kill -TERM `cat @l_prefix@/var/zebra/${protocol}d.pid` >/dev/null 2>&1
|| true
+ fi
+ done
%restart -p 200 -u @l_susr@
- opService zebra enable yes || exit 0
- zebra_stop
- sleep 2
- zebra_start
+ rcService zebra enable yes || exit 0
+ rc zebra stop; sleep 1
+ rc zebra start
+
+%daily -u @l_susr@
+ rcService zebra enable yes || exit 0
+ shtool rotate -f \
+ -n ${zebra_log_numfiles} -s ${zebra_log_minsize} -d \
+ -z ${zebra_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 644 \
+ -P "${zebra_log_prolog}" \
+ -E "${zebra_log_epilog}" \
+ @l_prefix@/var/zebra/zebra.log
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/zebra/zebra.spec
============================================================================
$ cvs diff -u -r1.38 -r1.39 zebra.spec
--- openpkg-src/zebra/zebra.spec 17 Jul 2003 15:33:33 -0000 1.38
+++ openpkg-src/zebra/zebra.spec 19 Jul 2003 10:21:26 -0000 1.39
@@ -33,7 +33,7 @@
Group: Network
License: GPL
Version: 0.93b
-Release: 20030717
+Release: 20030719
# list of sources
Source0: ftp://ftp.zebra.org/pub/zebra/zebra-%{version}.tar.gz
@@ -48,8 +48,8 @@
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
-BuildPreReq: OpenPKG, openpkg >= 20030717, gcc, perl
-PreReq: OpenPKG, openpkg >= 20030717
+BuildPreReq: OpenPKG, openpkg >= 20030718, gcc, perl
+PreReq: OpenPKG, openpkg >= 20030718
BuildPreReq: readline
PreReq: readline
AutoReq: no
@@ -140,7 +140,7 @@
%preun
if [ $1 -eq 0 ]; then
- $RPM_INSTALL_PREFIX/etc/rc zebra stop
+ $RPM_INSTALL_PREFIX/etc/rc zebra stop >/dev/null 2>&1 || true
rm -f $RPM_INSTALL_PREFIX/var/zebra/*.log
rm -f $RPM_INSTALL_PREFIX/var/zebra/*.pid
fi
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.5662 -r1.5663 news.txt
--- openpkg-web/news.txt 19 Jul 2003 09:25:25 -0000 1.5662
+++ openpkg-web/news.txt 19 Jul 2003 10:21:24 -0000 1.5663
@@ -1,3 +1,4 @@
+19-Jul-2003: Upgraded package: P<zebra-0.93b-20030719>
19-Jul-2003: Upgraded package: P<postgresql-7.3.3-20030719>
19-Jul-2003: Upgraded package: P<tcl-8.4.3-20030719>
19-Jul-2003: Upgraded package: P<openpkg-tool-20030719-20030719>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]