🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #7408

Re: INN 1.4 and HP-UX 9.05 on reboot

#7408
From: Dan Smisko
Date: Thu, 09 May 1996 00:00
84 lines
3054 bytes
Mario Piazzese (mpp@ultradata.com.au) wrote:
: Does anyone know have to get INN running on reboot on HP-UX 9.05?

: I have the following entry in /etc/rc in the function localrc():
:     # Start the News Server
:     if [ -x /usr/local/etc/rc.news ]; then
:         echo "Starting Internet News Server..."
:         su news -c /usr/local/etc/rc.news >/dev/console
:     fi

: On reboot the line "Starting Internet News Server..." is printed out
: yet the server does not start. If I enter the line as root is does
: start.

I had the same problem on various versions of HP-UX.

First thing, you need to be root to open the nntp port.  Inndstart
does this, so I made it setuid root.  This is mentioned in Install.ms.

Another glitch is that the rc.news script does "su news".  If you are
already news, it asks for a password.  This does not work well
unattended.  So I set the variable NEWSEXEC to "su news" or "/bin/sh"
if I'm root or news, respectively.

The method that rc.news uses to start innwatch doesn't (or didn't)
work on hpux for some reason.  I've seen it mentioned elsewhere.  This
has also been changed.

I also put in a hack to allow rc.news to be called from innwatch,
without starting another innwatch or clobbering its lock file.

This is probably more than you want, but here's the diffs from the
original in inn1.4-sec.


Dan Smisko



11c11
< DOINNWATCH=false
---
> DOINNWATCH=${1:-true}
16c16
< FLAGS="-i0"
---
> FLAGS="-i0 -x"
17a18,27
> : ${SHELL:=`sed -n '/^news/s/.*://p' /etc/passwd`}
> if [ `whoami` = root ] ; then
>    NEWSEXEC="su ${NEWSUSER}"
> elif [ `whoami` = ${NEWSUSER} ] ; then
>    NEWSEXEC=$SHELL
> else
>    echo Can\'t execute as `whoami`
>    exit 1
> fi
> 
53c63
<     #		&& mv history.n.pag history.pag" | su ${NEWSUSER}
---
>     #		&& mv history.n.pag history.pag" | ${NEWSEXEC}
58c68,71
< ( cd ${LOCKS} && rm -f LOCK* )
---
> ( cd ${LOCKS} &&
>   for i in LOCK* ; do
>      ${DOINNWATCH} || [ -z "$1" ] || [ "$i" != LOCK.innwatch ] && rm -f "$i"
>   done )
66,69c79,80
< # Gee, looks like lisp, doesn't it?
< ${DOINNWATCH} && {
<     echo "( ( sleep 60 ; ${INNWATCH} ) & )" | su ${NEWSUSER}
< }
---
> ${DOINNWATCH} &&
>    $SHELL -c "nohup $NEWSEXEC -c \"sleep 60 ; ${INNWATCH}\" <&- >&- 2>&- &"
78c89
<     echo "${NEWSBIN}/expirerm ${RMFILE}" | su ${NEWSUSER} &
---
>     $SHELL -c "nohup $NEWSEXEC -c \"${NEWSBIN}/expirerm ${RMFILE}\" <&- >&- 2>&- &"

Technical Details
Message-ID: <4mu0r0$mlc@hpavua.lf.hp.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.mbox.zip!not-for-mail
References: <3186A9D3.66C@ultradata.com.au>

Show Full Headers
Complete Article Headers
Message-ID: <4mu0r0$mlc@hpavua.lf.hp.com>
Subject: Re: INN 1.4 and HP-UX 9.05 on reboot
Date: Thu, 09 May 1996 00:00:00 +0000
From: smisko@lf.hp.com (Dan Smisko)
References: <3186A9D3.66C@ultradata.com.au>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 154012722
Distribution: inet
Organization: Hewlett-Packard Little Falls Site
Newsgroups: news.software.nntp