Re: Install a `service'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2002-12-05 at 13:31, Harry Putnam wrote:
> Pretty sure I recall being able to put an init script in
> /etc/rc.d/init.d  and then that script would be seen by such tools as
> chkconfig  setup  ntsysv would see it and be be able to setup the
> symlink.
> 
> That doesn't seem to work for me now.
[snip]
I seem to recall a this come up on this list before.  From memory you
have to do a couple of things.  You have to put a link to
/etc/rc.d/init.d/custom in /etc/rc.d/rcx.d/ (where x is the runlevel you
want the script to be started/stopped) and you have to name it some
special way: (S|K)yy<name>

I just searched the psyche archive and found these two which answer your
question.
1 dated Sat Oct 19 01:21:59 2002 by Martin Stricker:

> Subject: Add a new custom service to RH8
> Message-ID: <3DB0A5A7.6C0A9F71@gmx.de>

[the filename he's talking about is the link I mentioned
/etc/rc.d/rcx.d/]
> That's because such a filename is needed to start/stop that service at
> bootup or runlevel change. S means start it if entering the runlevel,
> K means stop (kill) it when leaving the runlevel. The two-digit number
> determines the execution order, 00 is first, 99 is last. This is
> important if a service depends on another (i. e. bring up the network
> interface before starting the network servers). Any filename that does
> not comply to this naming scheme will be ignored by init (man init for
> more information), and thus service does the right thing by ignoring it
> as well.
> 
> Best regards,
> Martin Stricker
> -- 
> Homepage: http://www.martin-stricker.de/
> Linux Migration Project: http://www.linux-migration.org/
> Red Hat Linux 7.3 for low memory: http://www.rule-project.org/
> Registered Linux user #210635: http://counter.li.org/

2. dated Sat Oct 19 02:08:46 2002 by Rob Thorne
> Subject: Add a new custom service to RH8
> Message-ID: <3DB0B09E.7090505@torenware.com>
> 
> Easiest way is to take a look at the manual entry for "chkconfig".  This 
> utility requires you to add a couple of special comment lines in the 
> script you copy to /etc/init.d,  and in return it will make all of the 
> funky links in the rcN.d directories for you.  It also gives you a nice 
> way to activate and deactivate the service on a given machine (i.e., 
> make a service available; you still turn it on and off by using the 
> 'service' utility).
> 
> I've done a couple of custom services this way; it's very quick, and a 
> lot less error-prone.
> 
> Good luck with it,
> Rob Thorne

Happy hacking!
-- 
Iain Buchanan <iain@nospam.pcorp.com.au>
It is bad luck to be superstitious.
		-- Andrew W. Mathis

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux