Find the answer to your Linux question:
Results 1 to 2 of 2
I'm running into a strange problem trying to change the service load or boot order on my CentOS 5.3 box. The service in question is shorewall. When I go to ...
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    3

    Change service load order...

    I'm running into a strange problem trying to change the service load or boot order on my CentOS 5.3 box.

    The service in question is shorewall. When I go to my /etc/rc.d/rc5.d/, I notice that shorewall is listed as S27shorewall. I need it to start much later. So I run a simple command "mv S27shorewall S99shorewall"

    I then restart the server. But after the reboot, something has reset it back to S27shorewall. Can anyone give me a clue why? Who or what is resetting it?

    For those of you who like the background story: I need to change it to S99shorewall, because I need shorewall to start AFTER xend does all its stuff, as xend messes around with the underlying networking of the computer. The xend stuff was at S98 and S99...but I was able to successfully rename them back to S97 and S98, and the rename stuck. I've also renamed other service orders. Those stick. The only one that gets reset is shorewall, always back to S27. I have no clue how to tell what is causing the resetting...

  2. #2
    Just Joined!
    Join Date
    Jun 2009
    Posts
    3
    Figured it out. I'll post the solution for anyone who stumbles in this thread.

    The script in /etc/init.d/ has info that helps tell when it should be started. The manfile for chkconfig explains it a bit. The following is from a man page (I'd post a link, but the forum prevents me from doing it).

    Code:
    For example, random.init has these three lines:
    
     # chkconfig: 2345 20 80
     # description: Saves and restores system entropy pool for \
     #              higher quality random number generation.
     
    
    This says that the random script should be started in levels 2, 3, 4, and 5, that its start priority should be 20, and that its stop priority should be 80. You should be able to figure out what the description says; the \ causes the line to be continued. The extra space in front of the line is ignored.
    So in my case, I changed it so the chkconfig was set to 99 for the start.

    It seems below there are variables which tell chkconfig where it should also sit (i.e., this service must start after the following classes of services start). I found I had to blank them out to get it to work just right. Ultimately, the start of my file looked like this:

    Code:
    #!/bin/sh
    #
    # Shorewall init script
    # chkconfig: 2345 99 90
    # description: Packet filtering firewall
    
    ### BEGIN INIT INFO
    # Provides: shorewall
    # Required-Start:
    # Should-Start:
    ...
    I then ran chkconfig shorewall resetpriorities. Success, it set it to S99. A reboot confirmed. So now I'm successfully using shorewall and xen on the same server, yay!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...