Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: "Adam Price" <adam+usenet@pappnase.demon.co.uk>
Subject: Re: rc3, init.d and starting things at bootime
Date: 1999/05/06	[thread overview]
Message-ID: <925970993.10924.0.nnrp-04.c2deb51d@news.demon.co.uk> (raw)
In-Reply-To: Pine.OSF.3.91.990506120506.16334A-100000@civilaa.civil


Brandon Hutchison wrote in message ...
>I realise this is a pretty naive request but could somebody give me an
>overview of how I get to automatically start something eg a webserver or
>a licence server at boottime.
>
>I've found this directory  /sbin/init.d which seems to contain scripts
>for starting things  and then there is the other one /sbin/rc3.d which
>seems to contain links to the previous one. The links are named in
>systematic ways starting with Snn....   where nn is a number.
>
>Do the scripts need to be written in any special way..
>
>The man pages on all this are pretty detailed and I sort of need an
overview.
>
>System: DEC Alphatstation running 4.0B DU.
>
>Thanks for your help..
>
>
Hi,
init reads the inittab at boot and runs /sbin/rc3 at startup this runs each
of the scripts named Sxxx in order (The order is ascii sort order, but
because all of the scripts start with Snn they seem to run in numeric order,
took me a while to realise why S100mystuff ran before S99stuff_i_depend_on)
with the argument start. Because the scripts may need to be run at different
run levels, it is good practice to put them in /sbin/init.d with a
meaningful name and then place a symbolic link in /sbin/rcX.d, where X is
the runlevel you want things to be started at.
Normally the scripts are written so that when called with start as an
argument they will start a service, and when called with stop as an argument
they will stop it, however there is nothing to stop you writing two scripts
to do this if you must.
The scripts with the K prefix are run with a stop argument at shutdown(bit
hazy here, may be on leaving the runlevel, long time since I looked)
So the simple answer is no you don't need to write your scripts any special
way, but if you do others may understand them better.
Take one of the scripts which is already there, and rip it to pieces, put
you own stop and start commands in the case statement, and don't forget
about that ordering.

Hope this helps
Adam








  parent reply	other threads:[~1999-05-06  4:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-06  4:00 rc3, init.d and starting things at bootime Brandon Hutchison
1999-05-06  4:00 ` Christian Krackowizer
1999-05-06  4:00   ` Adam Price
1999-05-07  4:00   ` Otis Gospodnetic
1999-05-06  4:00 ` Adam Price [this message]
1999-05-07  4:00 ` Oisin McGuinness
1999-05-07  4:00   ` Adam Price
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox