From: Mark Garrett <Mark.Garrett@wedontwantyourspam.com.au>
Subject: Re: where to put in /sbin/rc3.d
Date: Sun, 22 Apr 2001 12:51:01 GMT [thread overview]
Message-ID: <B7090F08.16FA9%Mark.Garrett@wedontwantyourspam.com.au> (raw)
In-Reply-To: 9c04ta$j4o$1@net44p.hkbu.edu.hk
in article 9c04ta$j4o$1@net44p.hkbu.edu.hk, Pui Ming WONG at
s11976@net2.hkbu.edu.hk wrote on 23/04/2001 12:43:
> want to start up the thirty party "Squid" reverse
> proxy server upon bootup
> Think i should create a link under
> /sbin/rc3.d like S66squid which links to
> ../init.d/squid, a shell script to start/stop the thing
>
> But how do i know which number to use
> (as i see there are other higher number ones like S93some-process)
> or i just make up a number
> Please advice
The number of purely arbitrary and used to order execution of startup. I use
S87squid but its an ordering choice. Here is the code from /sbin/rc3 that
processes the startup files ;-
if [ -d /sbin/rc3.d ]; then
for f in /sbin/rc3.d/S*
do
if [ -s $f ]; then
# Invoke executable startup scripts with the shell
# interpreter defined within each startup script.
# Non-executable startup scripts will be invoked
# with /sbin/sh by default.
if [ -x $f ]; then
$f start
else
/sbin/sh $f start
fi
fi
done
fi
As you can see it forces it to run as bourne shell if its not executable (ie
/sbin/sh) and is in the directory order as per the for f in /sbin/rc3.d/S*
Cheers
Mark :)
next prev parent reply other threads:[~2001-04-22 12:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-23 2:43 where to put in /sbin/rc3.d Pui Ming WONG
2001-04-22 12:51 ` Mark Garrett [this message]
2001-04-22 12:59 ` Jack Patteeuw
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