Send inn-committers mailing list submissions to
        inn-committers@lists.isc.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/inn-committers
or, via email, send a message with subject or body 'help' to
        inn-committers-requ...@lists.isc.org

You can reach the person managing the list at
        inn-committers-ow...@lists.isc.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-committers digest..."


Today's Topics:

   1. INN commit: trunk (doc/pod/cnfsstat.pod
      frontends/cnfsstat.in) (INN Commit)
   2. INN commit: trunk (6 files) (INN Commit)
   3. INN commit: trunk (3 files) (INN Commit)
   4. INN commit: trunk/support (mkmanifest) (INN Commit)
   5. INN commit: branches/2.5 (doc/pod/cnfsstat.pod
      frontends/cnfsstat.in) (INN Commit)


----------------------------------------------------------------------

Message: 1
Date: Wed, 24 Sep 2014 10:35:47 -0700 (PDT)
From: INN Commit <r...@isc.org>
To: inn-committ...@isc.org
Subject: INN commit: trunk (doc/pod/cnfsstat.pod
        frontends/cnfsstat.in)
Message-ID: <20140924173547.490b767...@hope.eyrie.org>

    Date: Wednesday, September 24, 2014 @ 10:35:46
  Author: iulius
Revision: 9721

cnfsstat:  add -i flag to specify how many seconds to sleep at startup

Update documentation, and homogenize POD syntax at the same time.

Modified:
  trunk/doc/pod/cnfsstat.pod
  trunk/frontends/cnfsstat.in

-----------------------+
 doc/pod/cnfsstat.pod  |   22 +++++++++++++++-------
 frontends/cnfsstat.in |   13 +++++++++++--
 2 files changed, 26 insertions(+), 9 deletions(-)

Modified: doc/pod/cnfsstat.pod
===================================================================
--- doc/pod/cnfsstat.pod        2014-09-24 02:53:29 UTC (rev 9720)
+++ doc/pod/cnfsstat.pod        2014-09-24 17:35:46 UTC (rev 9721)
@@ -4,13 +4,14 @@
 
 =head1 SYNOPSIS
 
-B<cnfsstat> [B<-ahpPsv>] [B<-c> I<class>] [B<-l> [I<seconds>]] [B<-m> 
I<buffer>]
+B<cnfsstat> [B<-ahpPsv>] [B<-c> I<class>] [B<-i> I<seconds>]
+[B<-l> [I<seconds>]] [B<-m> I<buffer>]
 
 =head1 DESCRIPTION
 
-I<cnfsstat> reads I<pathetc>/cycbuff.conf and I<pathetc>/storage.conf
+B<cnfsstat> reads I<pathetc>/cycbuff.conf and I<pathetc>/storage.conf
 to determine which CNFS buffers are available.  It then reads the specified
-cyclic buffers and shows their usage status.  I<cnfsstat> can be invoked from
+cyclic buffers and shows their usage status.  B<cnfsstat> can be invoked from
 B<rc.news> if I<docnfsstat> is set to true in F<inn.conf>, and the result is
 written to syslog(3).
 
@@ -20,7 +21,7 @@
 
 =item B<-a>
 
-Besides its usual output, I<cnfsstat> prints the age of the oldest article
+Besides its usual output, B<cnfsstat> prints the age of the oldest article
 in the cycbuff.  You may also want to use the B<-v> flag to see extended
 consistency checks.
 
@@ -32,11 +33,18 @@
 
 Print usage information and exit.
 
+=item B<-i> I<seconds>
+
+With this option, B<cnfsstat> has an initial sleep of I<seconds>
+seconds at startup.  This is useful when B<cnfsstat> is started at
+the same time as INN, so that it can wait a little before beginning
+performing its checks.
+
 =item B<-l> [I<seconds>]
 
-With this option, I<cnfsstat> prints a status snapshot every I<seconds>,
-and only exits if an error occurs.  When unspecified, the default interval
-is C<600> seconds.
+With this option, B<cnfsstat> prints a status snapshot every I<seconds>
+seconds, and only exits if an error occurs.  When unspecified, the
+default interval is C<600> seconds.
 
 At each iteration, B<cnfsstat> checks whether the F<cycbuff.conf> and
 F<storage.conf> files have been modified, and loads the new configuration

Modified: frontends/cnfsstat.in
===================================================================
--- frontends/cnfsstat.in       2014-09-24 02:53:29 UTC (rev 9720)
+++ frontends/cnfsstat.in       2014-09-24 17:35:46 UTC (rev 9721)
@@ -29,12 +29,13 @@
 Summary tool for CNFS
 
 Usage:
-       $0 [-ahpPsv] [-c class] [-l [seconds]] [-m buffer]
+       $0 [-ahpPsv] [-c class] [-i seconds] [-l [seconds]] [-m buffer]
 
        If called without args, does a one-time status of all CNFS buffers
        -a:           print the age of the oldest article in the cycbuff
        -c class:     print out status of CNFS buffers in that class
        -h:           this information
+       -i seconds:   initial sleep of that many seconds at startup
        -l [seconds]: loop like vmstat, default seconds = 600
        -m buffer:    print out information suitable for MRTG
        -p:           print out an MRTG config file
@@ -54,7 +55,7 @@
 my %opt = (c=>\$oclass, m=>\$obuffer);
 Getopt::Long::config('no_ignore_case');
 GetOptions(\%opt,
-           "-a", "-c=s", "-h", "-l:i", "-m=s",
+           "-a", "-c=s", "-h", "-i=i", "-l:i", "-m=s",
            "-p", "-P", "-s", "-v");
 
 usage() if $opt{'h'};
@@ -96,7 +97,15 @@
 mrtg($obuffer) if $obuffer;
 mrtg_config() if $opt{'p'};
 
+# Initial sleep, before starting the work.
+if(defined($opt{'i'}) && $opt{'i'} > 0) {
+    sleep($opt{'i'});
+    if (!$use_syslog) {
+        print STDOUT "$opt{'i'} seconds later:\n";
+    }
+}
 
+
 START:
 
 # Check whether the configuration files need reloading.



------------------------------

Message: 2
Date: Wed, 24 Sep 2014 10:47:13 -0700 (PDT)
From: INN Commit <r...@isc.org>
To: inn-committ...@isc.org
Subject: INN commit: trunk (6 files)
Message-ID: <20140924174713.4035667...@hope.eyrie.org>

    Date: Wednesday, September 24, 2014 @ 10:47:12
  Author: iulius
Revision: 9722

innwatch:  add -i flag to specify how many seconds to sleep at startup

- Also fix previous commit [9650] that did not totally fix the issue it
was supposed to fix.

- Fix the behaviour of the -f flag (it wasn't doing anything).

- Fix how the -l flag was parsed (a space was required between -l and
its argument, whils it should not have been required).

- Add new POD documentation for innwatch, and update it at the same time:
document new -i flag, and document already existing -f flag.

Added:
  trunk/doc/pod/innwatch.pod
Modified:
  trunk/MANIFEST
  trunk/doc/man/        (properties)
  trunk/doc/pod/Makefile
  trunk/scripts/innwatch.in
Deleted:
  trunk/doc/man/innwatch.8

----------------------+
 MANIFEST             |    1 
 doc/man/innwatch.8   |   59 --------------------------------------------
 doc/pod/Makefile     |    3 +-
 doc/pod/innwatch.pod |   65 +++++++++++++++++++++++++++++++++++++++++++++++++
 scripts/innwatch.in  |   28 +++++++++++++++------
 5 files changed, 89 insertions(+), 67 deletions(-)

Modified: MANIFEST
===================================================================
--- MANIFEST    2014-09-24 17:35:46 UTC (rev 9721)
+++ MANIFEST    2014-09-24 17:47:12 UTC (rev 9722)
@@ -276,6 +276,7 @@
 doc/pod/innfeed.pod                   Master file for innfeed.8
 doc/pod/innmail.pod                   Master file for innmail.1
 doc/pod/innupgrade.pod                Master file for innupgrade.8
+doc/pod/innwatch.pod                  Master file for innwatch.8
 doc/pod/innxmit.pod                   Master file for innxmit.8
 doc/pod/install.pod                   Master file for INSTALL
 doc/pod/libauth.pod                   Master file for libauth.3


Property changes on: trunk/doc/man
___________________________________________________________________
Modified: svn:ignore
   - active.5
active.times.5
actsync.8
archive.8
auth_krb5.8
batcher.8
buffchan.8
buffindexed.conf.5
ckpasswd.8
cnfsheadconf.8
cnfsstat.8
control.ctl.5
controlchan.8
convdate.1
ctlinnd.8
cvtbatch.8
cycbuff.conf.5
distrib.pats.5
distributions.5
docheckgroups.8
domain.8
expire.ctl.5
expire.8
expireover.8
expirerm.8
fastrm.1
getlist.1
grephistory.1
ident.8
incoming.conf.5
inews.1
inn-radius.conf.5
inn.conf.5
INN__Config.3pm
INN__Utils__Shlock.3pm
innbind.8
inncheck.8
innconfval.1
innd.8
inndf.8
innfeed.conf.5
innfeed.8
innmail.1
innupgrade.8
innxmit.8
libauth.3
libinnhist.3
libstorage.3
list.3
mailpost.8
makedbz.8
makehistory.8
mod-active.8
moderators.5
motd.news.5
newsfeeds.5
news.daily.8
news2mail.8
newslog.5
newsgroups.5
ninpaths.8
nnrpd.8
nntpsend.8
nntpsend.ctl.5
ovdb.5
ovdb_init.8
ovdb_monitor.8
ovdb_server.8
ovdb_stat.8
overchan.8
passwd.nntp.5
perl-nocem.8
pgpverify.1
procbatch.8
prunehistory.8
pullnews.1
qio.3
radius.8
rc.news.8
readers.conf.5
rnews.1
sasl.conf.5
scanlogs.8
scanspool.8
send-uucp.8
sendinpaths.8
shlock.1
simpleftp.1
sm.1
storage.conf.5
subscriptions.5
tally.control.8
tdx-util.8
tinyleaf.8
tst.3
uwildmat.3

   + active.5
active.times.5
actsync.8
archive.8
auth_krb5.8
batcher.8
buffchan.8
buffindexed.conf.5
ckpasswd.8
cnfsheadconf.8
cnfsstat.8
control.ctl.5
controlchan.8
convdate.1
ctlinnd.8
cvtbatch.8
cycbuff.conf.5
distrib.pats.5
distributions.5
docheckgroups.8
domain.8
expire.ctl.5
expire.8
expireover.8
expirerm.8
fastrm.1
getlist.1
grephistory.1
ident.8
incoming.conf.5
inews.1
inn-radius.conf.5
inn.conf.5
INN__Config.3pm
INN__Utils__Shlock.3pm
innbind.8
inncheck.8
innconfval.1
innd.8
inndf.8
innfeed.conf.5
innfeed.8
innmail.1
innupgrade.8
innwatch.8
innxmit.8
libauth.3
libinnhist.3
libstorage.3
list.3
mailpost.8
makedbz.8
makehistory.8
mod-active.8
moderators.5
motd.news.5
newsfeeds.5
news.daily.8
news2mail.8
newslog.5
newsgroups.5
ninpaths.8
nnrpd.8
nntpsend.8
nntpsend.ctl.5
ovdb.5
ovdb_init.8
ovdb_monitor.8
ovdb_server.8
ovdb_stat.8
overchan.8
passwd.nntp.5
perl-nocem.8
pgpverify.1
procbatch.8
prunehistory.8
pullnews.1
qio.3
radius.8
rc.news.8
readers.conf.5
rnews.1
sasl.conf.5
scanlogs.8
scanspool.8
send-uucp.8
sendinpaths.8
shlock.1
simpleftp.1
sm.1
storage.conf.5
subscriptions.5
tally.control.8
tdx-util.8
tinyleaf.8
tst.3
uwildmat.3


Deleted: doc/man/innwatch.8
===================================================================
--- doc/man/innwatch.8  2014-09-24 17:35:46 UTC (rev 9721)
+++ doc/man/innwatch.8  2014-09-24 17:47:12 UTC (rev 9722)
@@ -1,59 +0,0 @@
-.TH INNWATCH 8
-.SH NAME
-innwatch \- monitor innd.
-.SH SYNOPSIS
-.B innwatch 
-[ 
-.BI -l " logfile"
-]
-[
-.BI -t " seconds"
-]
-.SH DESCRIPTION
-.I Innwatch
-is normally started by
-.IR rc.news .
-It periodically \(em every
-.I <innwatchsleeptime in inn.conf>
-seconds \(em examines the load average, and the number of free blocks
-and inodes on the spool partition, as described by its
-control file,
-.IR innwatch.ctl .
-.PP
-If the load gets too high, or the disk gets too full, it throttles the server.
-When the condition restores, it unblocks the server.
-In addition, on each pass through the loop it will check the
-logfile
-.I <pathlog in inn.conf>/news.crit
-to see if it has been modified, and send mail to the news administrator
-if so.
-.PP
-Upon receipt of an interrupt signal (SIGINT),
-.IR innwatch
-will report its status in the file
-.IR <pathrun\ in\ inn.conf>/innwatch.status .
-.SH OPTIONS
-.TP
-.B \-l logfile
-To specify a log file to watch, other than the default of 
-.IR news.crit ,
-use the ``\fB\-l\fP'' flag.
-.TP
-.B \-t seconds
-To change the period between checks from the default from
-.I inn.conf ,
-use the ``\fB\-t\fP''
-flag.
-.SH HISTORY
-Written by Mike Cooper <mcoo...@usc.edu>, with modifications by
-<k...@munnari.oz.au>,  Steve Groom <st...@elroy.jpl.nasa.gov> and
-Christophe Wolfhugel <w...@pasteur.fr>.
-.de R$
-This is revision \\$3, dated \\$4.
-..
-.R$ $Id$
-.SH "SEE ALSO"
-ctlinnd(8), 
-inn.conf(5),
-innwatch.ctl(5),
-shlock(1).

Modified: doc/pod/Makefile
===================================================================
--- doc/pod/Makefile    2014-09-24 17:35:46 UTC (rev 9721)
+++ doc/pod/Makefile    2014-09-24 17:47:12 UTC (rev 9722)
@@ -35,7 +35,7 @@
        ../man/domain.8 ../man/expire.8 ../man/expireover.8 \
        ../man/expirerm.8 ../man/ident.8 \
        ../man/innbind.8 ../man/inncheck.8 ../man/innd.8 ../man/inndf.8 \
-       ../man/innfeed.8 ../man/innupgrade.8 \
+       ../man/innfeed.8 ../man/innupgrade.8 ../man/innwatch.8 \
        ../man/innxmit.8 \
        ../man/makedbz.8 ../man/makehistory.8 ../man/mod-active.8 \
        ../man/news.daily.8 ../man/news2mail.8 ../man/ninpaths.8 \
@@ -134,6 +134,7 @@
 ../man/inndf.8:                inndf.pod               ; $(POD2MAN) -s 8 $? > 
$@
 ../man/innfeed.8:      innfeed.pod             ; $(POD2MAN) -s 8 $? > $@
 ../man/innupgrade.8:   innupgrade.pod          ; $(POD2MAN) -s 8 $? > $@
+../man/innwatch.8:     innwatch.pod            ; $(POD2MAN) -s 8 $? > $@
 ../man/innxmit.8:      innxmit.pod             ; $(POD2MAN) -s 8 $? > $@
 ../man/makedbz.8:      makedbz.pod             ; $(POD2MAN) -s 8 $? > $@
 ../man/makehistory.8:  makehistory.pod         ; $(POD2MAN) -s 8 $? > $@

Added: doc/pod/innwatch.pod
===================================================================
--- doc/pod/innwatch.pod                                (rev 0)
+++ doc/pod/innwatch.pod        2014-09-24 17:47:12 UTC (rev 9722)
@@ -0,0 +1,65 @@
+=head1 NAME
+
+innwatch - Monitor the state of INN and the system
+
+=head1 SYNOPSIS
+
+B<innwatch> [B<-f> I<ctlfile>] [B<-i> I<seconds>] [B<-l> I<logfile>]
+[B<-t> I<seconds>]
+
+=head1 DESCRIPTION
+
+B<innwatch> is normally started by B<rc.news>.  Every
+I<innwatchsleeptime> seconds, as set in F<inn.conf>, it examines the load
+average, and the number of free blocks and inodes on the spool partition,
+as described by its control file, F<innwatch.ctl> in I<pathetc>.
+
+If the load gets too high, or the disk gets too full, it throttles
+the server.  When the condition restores, it unblocks the server.
+In addition, on each pass through the loop, it will check the logfile
+I<pathlog>/news.crit to see if it has been modified, and send mail to
+the news administrator if so.
+
+Upon receipt of an interrupt signal (SIGINT), B<innwatch> will report
+its status in the file F<innwatch.status> in I<pathrun>.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-f> I<file>
+
+Specify the control file to use, other than the default of
+F<innwatch.ctl> in I<pathetc>.
+
+=item B<-i> I<seconds>
+
+With this option, B<innwatch> has an initial sleep of I<seconds>
+seconds at startup.  This is useful when B<innwatch> is started at
+the same time as INN, so that it can wait a little before beginning
+performing its checks.
+
+=item B<-l> I<logfile>
+
+Specify a log file to watch, other than the default of F<news.crit>.
+
+=item B<-t> I<seconds>
+
+Specify the period in seconds between checks, to override the value
+set in F<inn.conf>.
+
+=back
+
+=head1 HISTORY
+
+Written by Mike Cooper <mcoo...@usc.edu>, with modifications by
+<k...@munnari.oz.au>, Steve Groom <st...@elroy.jpl.nasa.gov> and
+Christophe Wolfhugel <w...@pasteur.fr>.  Converted to POD by Julien Elie.
+
+$Id$
+
+=head1 SEE ALSO
+
+inn.conf(5), innwatch.ctl(5), newslog(5), rc.news(8).
+
+=cut


Property changes on: trunk/doc/pod/innwatch.pod
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Modified: scripts/innwatch.in
===================================================================
--- scripts/innwatch.in 2014-09-24 17:35:46 UTC (rev 9721)
+++ scripts/innwatch.in 2014-09-24 17:47:12 UTC (rev 9722)
@@ -17,6 +17,9 @@
 PROGNAME=innwatch
 LOCK=${LOCKS}/LOCK.${PROGNAME}
 DAILY=${LOCKS}/LOCK.news.daily
+INNWATCHINITIALSLEEPTIME=1
+CHILDPID=
+
 ##  Where to put the timestamp file (directory and filename).
 TIMESTAMP=${LOCKS}/${PROGNAME}.time
 
@@ -37,18 +40,25 @@
 while [ $# -gt 0 ] ; do
     case X"$1" in
     X-f)
-       FILE=$2
+       CTLWATCH=$2
        shift
        ;;
     X-f*)
-       FILE=`expr "$1" : '-s\(.*\)'`
+       CTLWATCH=`expr "$1" : '-f\(.*\)'`
        ;;
+    X-i)
+        INNWATCHINITIALSLEEPTIME=$2
+        shift
+        ;;
+    X-i*)
+        INNWATCHINITIALSLEEPTIME=`expr "$1" : '-i\(.*\)'`
+        ;;
     X-l)
        LOGFILE=$2
        shift
        ;;
     X-l*)
-       LOGFILE=`expr "$1" : '-s\(.*\)'`
+       LOGFILE=`expr "$1" : '-l\(.*\)'`
        ;;
     X-t)
        INNWATCHSLEEPTIME=$2
@@ -74,7 +84,7 @@
 
 ##  Process arguments.
 if [ $# -ne 0 ] ; then
-    echo "Usage:  ${PROGNAME} [flags]" 1>&2
+    echo "Usage:  ${PROGNAME} [-f ctlfile] [-i seconds] [-l logfile] [-t 
seconds]" 1>&2
     exit 1
 fi
 
@@ -86,7 +96,7 @@
     exit 0
 }
 
-trap 'rm -f ${LOCK} ${WATCHPID} ; exit 1' 1 3 15
+trap 'rm -f ${LOCK} ${WATCHPID} ; test -n "${CHILDPID}" && kill ${CHILDPID} ; 
exit 1' 1 3 15
 echo "$$" > ${WATCHPID}
 
 ##  The reason why we turned innd off, and its, and our current state.
@@ -102,7 +112,9 @@
 ##  We need to remember the process ID of innd, in case one exits.
 ##  But we need to wait for innd to start before we can do that.
 while PID=`cat ${SERVERPID} 2>/dev/null`; test -z "${PID}"; do
-    sleep ${INNWATCHSLEEPTIME}
+    sleep ${INNWATCHINITIALSLEEPTIME} & CHILDPID=$!
+    wait
+    CHILDPID=
 done
 
 trap '(
@@ -126,8 +138,10 @@
 NEXTSLEEP=1
 HASEXITED=false
 
-while sleep ${NEXTSLEEP}
+while { sleep ${NEXTSLEEP} & CHILDPID=$! ; }
 do
+    wait
+    CHILDPID=
     NEXTSLEEP=${INNWATCHSLEEPTIME}
 
     ##  If news.daily is running, idle:  we don't want to change the



------------------------------

Message: 3
Date: Wed, 24 Sep 2014 10:54:24 -0700 (PDT)
From: INN Commit <r...@isc.org>
To: inn-committ...@isc.org
Subject: INN commit: trunk (3 files)
Message-ID: <20140924175425.07fc567...@hope.eyrie.org>

    Date: Wednesday, September 24, 2014 @ 10:54:24
  Author: iulius
Revision: 9723

rc.news:  no longer explicitly sleep before starting innwatch and cnfsstat

Instead, make these two scripts sleep by themselves.

Also update documentation:  improve the list of actions done by rc.news,
and no longer mentions that innd should be throttled before being
stopped (this is not true - the shutdown process already does the
actions throttling does).

Modified:
  trunk/doc/pod/news.pod
  trunk/doc/pod/rc.news.pod
  trunk/scripts/rc.news.in

---------------------+
 doc/pod/news.pod    |    9 +++++++++
 doc/pod/rc.news.pod |   26 +++++++++++++++++---------
 scripts/rc.news.in  |    8 ++++----
 3 files changed, 30 insertions(+), 13 deletions(-)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod    2014-09-24 17:47:12 UTC (rev 9722)
+++ doc/pod/news.pod    2014-09-24 17:54:24 UTC (rev 9723)
@@ -198,6 +198,15 @@
 
 =item *
 
+Add new B<-i> flag to both B<cnfsstat> and B<innwatch> to specify
+how many seconds they should sleep at startup.  It will especially be
+useful in B<rc.news> so that these scripts are actually started and then
+sleep by themselves, instead of being started a minute after B<innd>
+and therefore not being properly stopped if C<rc.news stop> is invoked
+during that minute.
+
+=item *
+
 Fixed how B<innupgrade> is executed during an update of an INN
 installation; on a few systems like AIX, it fails to run because its
 taint mode was unproperly declared.

Modified: doc/pod/rc.news.pod
===================================================================
--- doc/pod/rc.news.pod 2014-09-24 17:47:12 UTC (rev 9722)
+++ doc/pod/rc.news.pod 2014-09-24 17:54:24 UTC (rev 9723)
@@ -4,7 +4,7 @@
 
 =head1 SYNOPSIS
 
-B<rc.news> [start | stop]
+B<rc.news> [C<start> | C<stop>]
 
 =head1 DESCRIPTION
 
@@ -45,6 +45,16 @@
 argument C<start> or C<stop> (to perform site-specific startup or shutdown
 tasks).
 
+=item *
+
+When started, if INN appears to have previously been shut down during
+its expiry process, run B<expirerm> if there are articles to unlink.
+
+=item *
+
+When started, if overview data appears to have just been rebuilt and
+F<active> needs to be renumbered, then actually renumber it.
+
 =back
 
 =head1 OPTIONS
@@ -58,8 +68,7 @@
 
 =item C<stop>
 
-If the first argument is C<stop>, B<rc.news> initiates INN shutdown.  It
-is recommended to throttle the server first as described in ctlinnd(8).
+If the first argument is C<stop>, B<rc.news> initiates INN shutdown.
 
 =back
 
@@ -67,16 +76,15 @@
 
 To start INN and leave certain error messages going to the terminal:
 
-       su - news -s /bin/sh -c <pathbin in inn.conf>/rc.news
+       su news -s /bin/sh -c <pathbin in inn.conf>/rc.news
 
 To run INN at startup time from appropriate system boot scripts:
 
-       su - news -s /bin/sh -c <pathbin>/rc.news >/dev/console
+       su news -s /bin/sh -c <pathbin>/rc.news >> <pathlog>/rc.news 2>&1
 
-To stop INN (throttling first):
+To stop INN:
 
-       <pathbin>/ctlinnd throttle reason
-       su - news -s /bin/sh -c '<pathbin>/rc.news stop'
+       su news -s /bin/sh -c '<pathbin>/rc.news stop'
 
 =head1 BUGS
 
@@ -95,6 +103,6 @@
 
 =head1 SEE ALSO
 
-ctlinnd(8), cnfsstat(8), inn.conf(5), innwatch(8), ovdb(5).
+ctlinnd(8), cnfsstat(8), expirerm(8), inn.conf(5), innwatch(8), ovdb(5).
 
 =cut

Modified: scripts/rc.news.in
===================================================================
--- scripts/rc.news.in  2014-09-24 17:47:12 UTC (rev 9722)
+++ scripts/rc.news.in  2014-09-24 17:54:24 UTC (rev 9723)
@@ -32,13 +32,13 @@
     # Stop innwatch (if running)
     if [ -f $WATCHPID ]; then
        kill `cat $WATCHPID`
-       rm -f $WATCHPID
+       rm -f $WATCHPID ${LOCKS}/LOCK.innwatch
     fi
 
     printf "Stopping innd: "
     ${PATHBIN}/ctlinnd shutdown 'rc.news stop'
 
-    # wait for innd to exit (up to 60 sec)
+    # Wait for innd to exit (up to 60 sec)
     pid=`cat ${SERVERPID} 2>/dev/null`
     if [ "$pid" != "" ]; then
        waitforpid $pid
@@ -163,12 +163,12 @@
 # Gee, looks like lisp, doesn't it?
 ${DOINNWATCH} && {
     echo "Scheduled start of ${INNWATCH}."
-    ( sleep 60 ; ${INNWATCH} ) > /dev/null &
+    ${INNWATCH} -i 60 > /dev/null &
 }
 
 ${DOCNFSSTAT} && {
     echo "Scheduled start of cnfsstat."
-    ( sleep 60 ; ${PATHBIN}/cnfsstat -s -l -P ) > /dev/null &
+    ${PATHBIN}/cnfsstat -i 60 -s -l -P > /dev/null &
 }
 
 RMFILE=${MOST_LOGS}/expire.rm



------------------------------

Message: 4
Date: Wed, 24 Sep 2014 10:55:09 -0700 (PDT)
From: INN Commit <r...@isc.org>
To: inn-committ...@isc.org
Subject: INN commit: trunk/support (mkmanifest)
Message-ID: <20140924175509.8cb1e67...@hope.eyrie.org>

    Date: Wednesday, September 24, 2014 @ 10:55:09
  Author: iulius
Revision: 9724

Add two missing contrib programs in the exceptions of mkmanifest

Modified:
  trunk/support/mkmanifest

------------+
 mkmanifest |    2 ++
 1 file changed, 2 insertions(+)

Modified: mkmanifest
===================================================================
--- mkmanifest  2014-09-24 17:54:24 UTC (rev 9723)
+++ mkmanifest  2014-09-24 17:55:09 UTC (rev 9724)
@@ -112,9 +112,11 @@
 backends/shlock
 backends/shrinkfile
 contrib/archivegz
+contrib/auth_pass
 contrib/backlogstat
 contrib/cleannewsgroups
 contrib/delayer
+contrib/expirectl
 contrib/findreadgroups
 contrib/makeexpctl
 contrib/makestorconf



------------------------------

Message: 5
Date: Wed, 24 Sep 2014 11:01:11 -0700 (PDT)
From: INN Commit <r...@isc.org>
To: inn-committ...@isc.org
Subject: INN commit: branches/2.5 (doc/pod/cnfsstat.pod
        frontends/cnfsstat.in)
Message-ID: <20140924180111.6677167...@hope.eyrie.org>

    Date: Wednesday, September 24, 2014 @ 11:01:11
  Author: iulius
Revision: 9725

cnfsstat:  add -i flag to specify how many seconds to sleep at startup

Update documentation, and homogenize POD syntax at the same time.

Modified:
  branches/2.5/doc/pod/cnfsstat.pod
  branches/2.5/frontends/cnfsstat.in

-----------------------+
 doc/pod/cnfsstat.pod  |   22 +++++++++++++++-------
 frontends/cnfsstat.in |   13 +++++++++++--
 2 files changed, 26 insertions(+), 9 deletions(-)

Modified: doc/pod/cnfsstat.pod
===================================================================
--- doc/pod/cnfsstat.pod        2014-09-24 17:55:09 UTC (rev 9724)
+++ doc/pod/cnfsstat.pod        2014-09-24 18:01:11 UTC (rev 9725)
@@ -4,13 +4,14 @@
 
 =head1 SYNOPSIS
 
-B<cnfsstat> [B<-ahpPsv>] [B<-c> I<class>] [B<-l> [I<seconds>]] [B<-m> 
I<buffer>]
+B<cnfsstat> [B<-ahpPsv>] [B<-c> I<class>] [B<-i> I<seconds>]
+[B<-l> [I<seconds>]] [B<-m> I<buffer>]
 
 =head1 DESCRIPTION
 
-I<cnfsstat> reads I<pathetc>/cycbuff.conf and I<pathetc>/storage.conf
+B<cnfsstat> reads I<pathetc>/cycbuff.conf and I<pathetc>/storage.conf
 to determine which CNFS buffers are available.  It then reads the specified
-cyclic buffers and shows their usage status.  I<cnfsstat> can be invoked from
+cyclic buffers and shows their usage status.  B<cnfsstat> can be invoked from
 B<rc.news> if I<docnfsstat> is set to true in F<inn.conf>, and the result is
 written to syslog(3).
 
@@ -20,7 +21,7 @@
 
 =item B<-a>
 
-Besides its usual output, I<cnfsstat> prints the age of the oldest article
+Besides its usual output, B<cnfsstat> prints the age of the oldest article
 in the cycbuff.  You may also want to use the B<-v> flag to see extended
 consistency checks.
 
@@ -32,11 +33,18 @@
 
 Print usage information and exit.
 
+=item B<-i> I<seconds>
+
+With this option, B<cnfsstat> has an initial sleep of I<seconds>
+seconds at startup.  This is useful when B<cnfsstat> is started at
+the same time as INN, so that it can wait a little before beginning
+performing its checks.
+
 =item B<-l> [I<seconds>]
 
-With this option, I<cnfsstat> prints a status snapshot every I<seconds>,
-and only exits if an error occurs.  When unspecified, the default interval
-is C<600> seconds.
+With this option, B<cnfsstat> prints a status snapshot every I<seconds>
+seconds, and only exits if an error occurs.  When unspecified, the
+default interval is C<600> seconds.
 
 At each iteration, B<cnfsstat> checks whether the F<cycbuff.conf> and
 F<storage.conf> files have been modified, and loads the new configuration

Modified: frontends/cnfsstat.in
===================================================================
--- frontends/cnfsstat.in       2014-09-24 17:55:09 UTC (rev 9724)
+++ frontends/cnfsstat.in       2014-09-24 18:01:11 UTC (rev 9725)
@@ -29,12 +29,13 @@
 Summary tool for CNFS
 
 Usage:
-       $0 [-ahpPsv] [-c class] [-l [seconds]] [-m buffer]
+       $0 [-ahpPsv] [-c class] [-i seconds] [-l [seconds]] [-m buffer]
 
        If called without args, does a one-time status of all CNFS buffers
        -a:           print the age of the oldest article in the cycbuff
        -c class:     print out status of CNFS buffers in that class
        -h:           this information
+       -i seconds:   initial sleep of that many seconds at startup
        -l [seconds]: loop like vmstat, default seconds = 600
        -m buffer:    print out information suitable for MRTG
        -p:           print out an MRTG config file
@@ -54,7 +55,7 @@
 my %opt = (c=>\$oclass, m=>\$obuffer);
 Getopt::Long::config('no_ignore_case');
 GetOptions(\%opt,
-           "-a", "-c=s", "-h", "-l:i", "-m=s",
+           "-a", "-c=s", "-h", "-i=i", "-l:i", "-m=s",
            "-p", "-P", "-s", "-v");
 
 usage() if $opt{'h'};
@@ -96,7 +97,15 @@
 mrtg($obuffer) if $obuffer;
 mrtg_config() if $opt{'p'};
 
+# Initial sleep, before starting the work.
+if(defined($opt{'i'}) && $opt{'i'} > 0) {
+    sleep($opt{'i'});
+    if (!$use_syslog) {
+        print STDOUT "$opt{'i'} seconds later:\n";
+    }
+}
 
+
 START:
 
 # Check whether the configuration files need reloading.



------------------------------

_______________________________________________
inn-committers mailing list
inn-committers@lists.isc.org
https://lists.isc.org/mailman/listinfo/inn-committers

End of inn-committers Digest, Vol 67, Issue 20
**********************************************

Reply via email to