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: 01-Oct-2003 18:02:06
Branch: HEAD Handle: 2003100117020005
Modified files:
openpkg-src/rdist rc.rdist rdist.spec
openpkg-web news.txt
Log:
Implement features in ticket #202, but leave this JUNK package broken
for now
Summary:
Revision Changes Path
1.6 +37 -1 openpkg-src/rdist/rc.rdist
1.13 +19 -6 openpkg-src/rdist/rdist.spec
1.6810 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/rdist/rc.rdist
============================================================================
$ cvs diff -u -r1.5 -r1.6 rc.rdist
--- openpkg-src/rdist/rc.rdist 21 Jul 2003 08:40:47 -0000 1.5
+++ openpkg-src/rdist/rc.rdist 1 Oct 2003 16:02:05 -0000 1.6
@@ -11,14 +11,50 @@
rdist_log_minsize="1M"
rdist_log_complevel="9"
+%common
+ rdist_pidfile="@l_prefix@/var/rdist/rdist.pid"
+ rdist_cfgfile="@l_prefix@/etc/rdist/rdist.conf"
+ rdist_signal () {
+ [ -f $rdist_pidfile ] && kill -$1 `cat $rdist_pidfile`
+ }
+
+%status -u @l_susr@ -o
+ rdist_usable="unknown"
+ rdist_active="no"
+ rcService rdist enable yes && \
+ rdist_signal 0 && rdist_active="yes"
+ echo "rdist_enable=\"$rdist_enable\""
+ echo "rdist_usable=\"$rdist_usable\""
+ echo "rdist_active=\"$rdist_active\""
+
+%start -u @l_susr@
+ rcService rdist enable yes || exit 0
+ rcService rdist active yes && exit 0
+ @l_prefix@/sbin/rdist -S -D &
+ echo $! >$rdist_pidfile
+
+%stop -u @l_susr@
+ rcService rdist enable yes || exit 0
+ rcService rdist active no && exit 0
+ rdist_signal TERM
+ rm $rdist_pidfile
+
+%restart -u @l_susr@
+ rcService rdist enable yes || exit 0
+ rcService rdist active no && exit 0
+ rc rdist stop
+ sleep 2
+ rc rdist start
+
%daily -u @l_susr@
rcService rdist enable yes || exit 0
# rotate logfile
shtool rotate -f \
-n ${rdist_log_numfiles} -s ${rdist_log_minsize} -d \
- -z ${rdist_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 644 \
+ -z ${rdist_log_complevel} -o @l_susr@ -g @l_mgrp@ -m 644 \
-P "${rdist_log_prolog}" \
+ -E "${rdist_log_epilog} && rc rdist restart" \
-E "${rdist_log_epilog}" \
@l_prefix@/var/rdist/rdist.log
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/rdist/rdist.spec
============================================================================
$ cvs diff -u -r1.12 -r1.13 rdist.spec
--- openpkg-src/rdist/rdist.spec 21 Jul 2003 08:40:47 -0000 1.12
+++ openpkg-src/rdist/rdist.spec 1 Oct 2003 16:02:05 -0000 1.13
@@ -40,13 +40,13 @@
Group: Filesystem
License: BSD
Version: %{V_opkg}
-Release: 20030721
+Release: 20031001
# package options
%option with_fsl yes
# list of sources
-Source0: http://www.magnicomp.com/download/rdist/rdist-%{V_base}-%{V_pl}.tar.gz
+Source0: ftp://ftp.rge.com/download/rdist/rdist-%{V_base}-%{V_pl}.tar.gz
Source1: rc.rdist
Source2: fsl.rdist
@@ -63,10 +63,9 @@
AutoReqProv: no
%description
- RDist is an open source program to maintain identical copies of
- files over multiple hosts. It preserves the owner, group, mode,
- and mtime of files if possible and can update programs that are
- executing.
+ RDist maintains identical copies of files over multiple hosts.
+ It preserves the owner, group, mode, and mtime of files if
+ possible and can update programs that are executing.
%prep
%setup -q -n rdist-%{V_base}-%{V_pl}
@@ -123,4 +122,18 @@
%clean
rm -rf $RPM_BUILD_ROOT
+
+%post
+ # after upgrade, restart service
+ [ $1 -eq 2 ] || exit 0
+ eval `%{l_rc} rdist status 2>/dev/null`
+ [ ".$rdist_active" = .yes ] && %{l_rc} rdist restart
+ exit 0
+
+%preun
+ # before erase, stop service and remove log files
+ [ $1 -eq 0 ] || exit 0
+ %{l_rc} rdist stop 2>/dev/null
+ rm -f $RPM_INSTALL_PREFIX/var/rdist/rdist.log* >/dev/null 2>&1 || true
+ exit 0
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.6809 -r1.6810 news.txt
--- openpkg-web/news.txt 1 Oct 2003 14:37:46 -0000 1.6809
+++ openpkg-web/news.txt 1 Oct 2003 16:02:00 -0000 1.6810
@@ -1,3 +1,4 @@
+01-Oct-2003: Upgraded package: P<rdist-7.0.0a10-20031001>
01-Oct-2003: Upgraded package: P<spambouncer-1.7.20031001-20031001>
01-Oct-2003: Upgraded package: P<vrrpd-0.8.7-20031001>
01-Oct-2003: Upgraded package: P<pb4sd-1.2-1.2.1>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]