INN commit: trunk (3 files)

INN Commit rra at isc.org
Wed Sep 24 17:54:24 UTC 2014


    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



More information about the inn-committers mailing list