Thread View: news.software.nntp
4 messages
4 total messages
Started by David M. Gursky
Sat, 25 May 1996 00:00
Integrating INN into Solaris startup (repost)
Author: David M. Gursky
Date: Sat, 25 May 1996 00:00
Date: Sat, 25 May 1996 00:00
25 lines
1744 bytes
1744 bytes
The original version of this message may have gotten lost in the shuffle of our new news server, so I am reposting it. I have just installed INN onto a new SPARC 5 running Solaris 2.5. Everything seems to be working reasonably well (we're still working out some minro problems associated with transferring the old news files from our original nntp server, but I digress). Now integrating INN into the startup of our old server was easy (primarily because on SunOS 4.1.x, there is the rc.local script that you can modify to your hearts content.) Now on Solaris 2, there is ths large collection of state based rc files, and I have no idea what is the accepted practice for calling rc.news from this suite of files in /etc. Any insight will be appreciated. Thank you. David M. Gursky ddg@qsi.com Quality Systems, Inc. NeXTMAIL and MIME accepted 4000 Legato Road, Suite 1100 finger ddg@qsi.com for PGP key Fairfax, VA 22033 (703) 352-9200 Voice / (703) 352-9216 Fax
Re: Integrating INN into Solaris startup (repost)
Author: Mark Turner
Date: Sun, 26 May 1996 00:00
Date: Sun, 26 May 1996 00:00
45 lines
2739 bytes
2739 bytes
In article <Pine.GSO.3.93.960525104224.20027A-100000@qsihome0.qsi.com>, David M. Gursky <ddg@qsi.com> wrote: > > Now integrating INN into the startup of our old server was easy (primarily > because on SunOS 4.1.x, there is the rc.local script that you can modify > to your hearts content.) Now on Solaris 2, there is ths large collection > of state based rc files, and I have no idea what is the accepted practice > for calling rc.news from this suite of files in /etc. Any insight will be > appreciated. You'll need to create a script called "news" (or something else if you prefer) in /etc/init.d, with links to /etc/rc2.d/S93news and /etc/rc2.d/K93news. The number 93 is what I happen to use but you could choose your own number, the scripts are run in numerical order to allow you to define the order of various things starting and stopping. As the system enters run level 2 the script /etc/rc2.d/S93news will be executed as root with one parameter "start", and as the system leaves run level 2 on the way down that same script will be called but this time with one parameter "stop". At any time you can run "/etc/init.d/news start" or "/etc/init.d/news stop" to start or stop the news system. The script obviously needs to look at the parameter and start or stop the news system according to the parameter. The "start" version could simply run rc.news and the "stop" could simply run "ctlinnd shutdown WHATEVER", but you might want to start or kill off other news-related processes. I would have included the script we use at PIPEX but I'm offline at the moment so can't get at it. Look at other scripts in /etc/init.d for examples. Some people think this method is more fiddly than the old "stick it in rc.local" approach, but I find it much more flexible. One major advantage is that you can simply thow a tar file at a machine to install something without worrying about overwriting or having to amend rc.local. Installing something that needs no machine-specific configuration, such as xntpd, now takes only a few commands and a very small number of seconds. Hope this helps. Cheers, Mark.
Re: Integrating INN into Solaris startup (repost)
Author: Todd D. Taft
Date: Tue, 28 May 1996 00:00
Date: Tue, 28 May 1996 00:00
76 lines
3813 bytes
3813 bytes
In article <Pine.GSO.3.93.960525104224.20027A-100000@qsihome0.qsi.com>,
David M. Gursky <ddg@qsi.com> wrote:
>Now integrating INN into the startup of our old server was easy (primarily
>because on SunOS 4.1.x, there is the rc.local script that you can modify
>to your hearts content.) Now on Solaris 2, there is ths large collection
>of state based rc files, and I have no idea what is the accepted practice
>for calling rc.news from this suite of files in /etc. Any insight will be
>appreciated.
Our solaris news server normally runs at init level 3 (You will probably be
the same, though you may run at levels 2 or 4. Look for the line default
line in /etc/inittab). So, I have the script that starts and stops news
located in /etc/init.d/news. I have it hard links to this file named:
/etc/rc0.d/K30news, /etc/rc2.d/K30news, and /etc/rc3.d/S99news. I don't
think that we made any major changes to the default startup/shutdown scripts
before adding in news, so these script names would probably put everything
in the right place. Basically, what this does is it will start up your
news when you go into a normal multi-user level, and it will stop your
news server when you want to shutdown the system or go into single user mode.
My script looks like this: (Apologies in advance for blasphemizing solaris
with the IBM-ese term subsystem, which it really isn't technically)
#
# Copyright (c) 1996, by UNC
#
#ident "@(#)inn 1.4unoff4 96/06/10 TDT"
# Need the commands echo, ps, awk, kill, sleep (Need ucb version of echo)
#PATH=${PATH}${PATH:+:}/sbin:/bin:/usr/bin
PATH=/usr/ucb:/sbin:/bin:/usr/bin
killproc() { # kill the named process(es)
awkfield2='$2'
pid=`/usr/bin/ps -ef | awk "/$1/ && ! /awk/ {print $awkfield2}"`
[ "$pid" != "" ] && kill -KILL $pid
}
case "$1" in
'start')
if [ -f /newslib/etc/rc.news ]; then
echo "Starting INN Subsystem..."
su uncnews -c /newslib/etc/rc.news # 1>/dev/console 2>&1
echo "Done starting INN Subsystem"
fi
;;
'stop')
inndrunning=`/usr/bin/ps -ef | awk '/inn/ && ! /awk/'`
if [ "${inndrunning}" != "" ]; then
echo "Halting INN Subsystem..."
echo -n "Throttling inn..."
/newslib/bin/ctlinnd throttle "System halt"
sleep 5
echo -n "Shutting down inn..."
/newslib/bin/ctlinnd shutdown "System halt" && echo "halted"
sleep 5
echo -n "Killing innwatch..."
#This will also kill innd if it's still running
killproc inn && echo "killed"
echo -n "Killing nnrpd..."
killproc nnrpd && echo "killed"
echo "Done halting INN Subsystem"
fi
;;
*)
echo "Usage: /etc/init.d/news { start | stop }"
;;
esac
exit 0
--
Todd D. Taft taft@cs.unc.edu
WWW: http://www.cs.unc.edu/~taft/ todd_taft@unc.edu
U.N.C. Department of Computer Science Facilities Staff
Re: Integrating INN into Solaris startup (repost)
Author: Seong-ho Jang
Date: Thu, 30 May 1996 00:00
Date: Thu, 30 May 1996 00:00
14 lines
992 bytes
992 bytes
On Sat, 25 May 1996 10:47:41 -0400, "David M. Gursky" <ddg@qsi.com> wrote: > Now on Solaris 2, there is ths large collection >of state based rc files, and I have no idea what is the accepted practice >for calling rc.news from this suite of files in /etc. Any insight will be >appreciated. 1.rename rc.local such like S100rc.local 2.move S100rc.local /etc/rc2.d 3.chmod 755 S100rc.local 4.reboot
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads