[clue] [Tech] Red Hat Ent Server runlevels

chris fedde chris at fedde.us
Tue Jul 12 13:44:57 MDT 2011


The easiest approach is to copy na init.d script for something simple
like cron and modify it for your purposes.  If done right then your
script will work with chkconfig.   The mechanisms are pretty straight
forward but I think it is easier to work from an example than to craft
something from whole cloth.

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
>


More information about the clue mailing list