🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #79699

Re: INN's "news.daily" script.

#79699
From: D. Stussy
Date: Wed, 19 Nov 2008 23:56
43 lines
3070 bytes
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message news:gg0tq5$i67$1@news.trigofacile.com...
> > This means un-reserving the server only if we find it's "our" reserved string that's in the mode
> > status report -- in case multiple copies of the script are running.
> >
> >> Index: news.daily.in
> >> ===================================================================
> >> --- news.daily.in       (révision 8162)
> >> +++ news.daily.in       (copie de travail)
> >> @@ -385,6 +385,9 @@
> >>  ${DORM} &&
> >>      find ${TEMPSOCKDIR} -name "${TEMPSOCK}" -mtime +2 -exec rm -f '{}' ';'
> >>
> >> +##  Remove the possible reserve mode (in case expire was killed).
> >> +ctlinnd -s reserve "" 2>/dev/null
> >> +
> >>  ##  Did we become throttled during the run?
> >>  SERVERMODE=`ctlinnd mode 2>/dev/null | ${SED} 1q`
> >>  case "${SERVERMODE}" in
> >>
> >
> > Still an issue.  Placement of the function is the problem.
>
> Why the placement?  Expire is finished at the time this "ctlinnd reserve" call is made.
> Afterwards, it is expireover, renumbering and innstat (which generates the status you
> spoke about).  Do you want to wait for the end of expireover and renumbering?  Why?

That's not the problem.  It should be in a place where it cannot be bypassed (except by the check for its own reason, below).

My first thought was to put it at the end of the file.  However, it could be released earlier.  My second thought was to put it next
to the "go" control (inside the go's if clause).  However, it got bypassed on errors that don't cause go to be commanded.  If there
are any errors that use an exit, we might need this more than once.

> Suggestion:
>
> if (ctlinnd mode | grep "Reserved ${REASON}" > /dev/null) ; then
>   ctlinnd -s reserve "" 2>/dev/null
> fi
>
> Or do you want something else?

NO.  That's fine.

Technical Details
Message-ID: <gg2933$isq$1@snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!news.linkpendium.com!news.linkpendium.com!news.snarked.org!not-for-mail
References: <gfgkvd$o22$1@snarked.org> <gfi9q3$459$1@snarked.org> <gfu75v$3lg$1@news.trigofacile.com> <gfvoil$8ts$1@snarked.org> <gg0tq5$i67$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <gg2933$isq$1@snarked.org>
Subject: Re: INN's "news.daily" script.
Date: Wed, 19 Nov 2008 15:56:19 -0800
From: "D. Stussy" <spam@bde-arc.ampr.org>
References: <gfgkvd$o22$1@snarked.org> <gfi9q3$459$1@snarked.org> <gfu75v$3lg$1@news.trigofacile.com> <gfvoil$8ts$1@snarked.org> <gg0tq5$i67$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!news.linkpendium.com!news.linkpendium.com!news.snarked.org!not-for-mail
Newsgroups: news.software.nntp
Lines: 43
Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org>
NNTP-Posting-Host: pool-71-116-244-151.lsanca.dsl-w.verizon.net
X-Trace: snarked.org 1227138979 19354 71.116.244.151 (19 Nov 2008 23:56:19 GMT)
X-Complaints-To: newsmaster@snarked.org
NNTP-Posting-Date: Wed, 19 Nov 2008 23:56:19 +0000 (UTC)
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478