rkt logo

INN FAQ Part 2

NOTE: The maintainers of the INN FAQ stopped publishing in December 1997.
An important update to this topic is provided by Mib Software in the Usenet RKT for Subscribers.

Subject: (2.8) Linux tips


Get inn-1.4-linux-0.1.tar from ftp://sunsite.unc.edu/pub/Linux/system/News
It contains instructions for installing INN on a Linux system and a
working config.data file. (from ghio@myriad.pc.cc.cmu.edu)

If you don't follow the directions in inn-1.4-linux-0.1.tar, here
are some of the problems you might have:

> nntpsend.log says the following.

> nntpsend: [214:222] innxmit -a -t300 -T1800
> travelers.mail.cornell.edu ...
> Ignoring line "cornell/test/13 805 ..."
> sh: PPID read-only variable

Tomasz Surmacz <tsurmacz@ict.pwr.wroc.pl> writes:

If you are using INN under Linux or have your /bin/sh a symlink to
/bin/bash the above problem appears (in nntpsend precisely speaking,
not innxmit)

The problem is that bash already defines the PPID variable and
nntpsend is trying to use it too. To fix this:

1. comment out line PPID = $$
2. change all occurrences of PPID to say PARENTPID

I have also noticed that changing first line of nntpsend from
'#!/bin/sh' to "#!/bin/bash" helps in such occasions.

Slackware 3.0 seems to have a different incarnation of df than others
- so if you want to run innwatch change the following in innwatch.ctl:

From:
< ##  =()<!!! df -i . | awk 'NR == 2 { print $3 }' ! lt !  @<INNWATCH_SPOOLNODES>@ ! throttle ! No space (spool inodes)>()=
< !!! df -i . | awk 'NR == 2 { print $3 }' ! lt ! 200 ! throttle ! No space (spool inodes)
To:
> ##  =()<!!! df -i . | awk 'NR == 2 { print $4 }' ! lt !  @<INNWATCH_SPOOLNODES>@ ! throttle ! No space (spool inodes)>()=
> !!! df -i . | awk 'NR == 2 { print $4 }' ! lt ! 200 ! throttle ! No space (spool inodes)

(from Jim Kerr <jak7@opsirm1.em.cdc.gov>)

------

Linux 2.x complains at compiling:

gcc -O -o nnrpd article.o group.o commands.o misc.o newnews.o nnrpd.o
post.o loadave.o ../libinn.a
loadave.o(.text+0x3b): undefined reference to `nlist'
You can either add /usr/lib/libelf.a as missing library to the
Makefile or apply the following patch (with some fuzz ... ) from
coneill@premier1.premier.net (Clayton O'Neill) :

--- /usr/local/news/INN/nnrpd/loadave.c Fri Jan 29 10:51:58 1993
+++ loadave.c   Wed Jul 17 15:36:30 1996
@@ -1,8 +1,28 @@
-/*  $Revision: 2.34 $
+/*  $Revision: 2.34 $
 **
 */
 #include "nnrpd.h"
 #if    NNRP_LOADLIMIT > 0
+#ifdef linux
+
+/*
+**  Get the current load average as an integer.
+*/
+int
+GetLoadAverage()
+{
+    FILE *ProcLoadAve;
+    float load;
+
+    if ((ProcLoadAve=fopen("/proc/loadavg", "r"))==NULL)
+        return -1;
+    if (fscanf(ProcLoadAve,"%f", &load)!=1)
+       return -1;
+    fclose(ProcLoadAve);
+    return (int)(load+0.5);
+}
+
+#else
 #include <nlist.h>
[...]
+ #endif  /* linux */
#endif  /* NNRP_LOADLIMIT > 0 */

------

In some newer versions of Linux, nnrpd seems to seg fault. Reason is
the size of fd_set (1024 bit), but the macros FD_??? operate on
256bit). This happens if HAVE_UNISTD is set to DONT, so set it to DO.
If it still happens, then include <sys/time.h> at the top of include/clibrary.h

------

It might be that rc.news never terminates in unoff4 (and probably
other versions), when having DOINNWATCH=true. If this happens then
include a '&' in rc.news as shown:

: ${DOINNWATCH} && {
:     ( sleep 60 ; ${INNWATCH} & ) &
                              ^^^

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

[Source: INN FAQ Part 2 Archive-name: usenet/software/inn-faq/part2]
[Last Changed: $Date: 1997/09/23 01:25:52 $ $Revision: 2.34 $]
[Copyright: 1997 Heiko Rupp, portions by Tom Limoncelli, Rich Salz, et al.]