[clue] [Tech] Red Hat Ent Server runlevels

Dan Kulinski daniel at kulinski.net
Mon Jul 11 14:58:06 MDT 2011


While this will do what you want you should actually use SysVInit stuff from
Red Hat so you can control it from chkconfig and service scripts.

If you look at existing scripts in /etc/init.d you will see that they have
two specially crafted comments:
# chkconfig: - 13 87
# description: named (BIND) is a Domain Name Server (DNS)

This tells chkconfig to start it at priority 87 (which conversely will stop
it at priority 13).

To enable this service you would do chkconfig named on.

To verify it was to start up you would do:
chkconfig --list named

Dan Kulinski


On Mon, Jul 11, 2011 at 2:38 PM, Bruce Ediger <bediger at stratigery.com>wrote:

> I'm a native Slackware user, and my other PC runs Arch at the moment,
> but I need some plain talk about Red Hat Enterprise Server runlevels.
>
> Suppose I have a server that I want started when a system boots.
> My understanding is this:
>
> I write a /bin/sh script that takes one command-line parameter, "start"
> or "stop".  When run with "start", the script has to fire up the server.
> When run with "stop", it has to stop the server.
>
> I put the /bin/sh script in /etc/rc.d/init.d.  I make it owned by
> root/root, and give it 700 permissions.
>
> I create symbolic links from that /bin/sh script to
> /etc/rc.d/rc3.d/S99mynewscript and /etc/rc.d/rc5.d/K99mynewscript
> and /etc/rc.d/rc6.d/K99mynewscript
>
> Then, I reboot and verify that my server gets stopped and started
> correctly.
>
> Is anything wrong with the procedure above? Have I mixed Slackware and
> Arch style runlevels with Red Hat runlevels?  Am I even close to
> correct?
>
> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20110711/93c9eaba/attachment.html 


More information about the clue mailing list