I'm trying to create an initialization scrip in the /etc/init.d/. Of course, the one I have is failing! At the top of the other initialization scripts in the same directory, there is are two lines, the chkconfig and description # chkconfig: 2345 55 25 # description: OpenSSH server daemon On the check config line, what are the numbers/attributes that follow? If I'm creating an initialization script, what numbers/considerations should I make? Thanks, Todd -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20070215/c16f7051/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3149 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20070215/c16f7051/attachment.bin>
On 15/02/07, Todd Reed <treed at astate.edu> wrote:> I'm trying to create an initialization scrip in the /etc/init.d/. Of > course, the one I have is failing! At the top of the other initialization > scripts in the same directory, there is are two lines, the chkconfig and > description > > # chkconfig: 2345 55 25 > > # description: OpenSSH server daemon > > On the check config line, what are the numbers/attributes that follow? If > I'm creating an initialization script, what numbers/considerations should I > make?It's all explained in the FM. man chkconfig... RUNLEVEL FILES Each service which should be manageable by chkconfig needs two or more commented lines added to its init.d script. The first line tells chk- config what runlevels the service should be started in by default, as well as the start and stop priority levels. If the service should not, by default, be started in any runlevels, a - should be used in place of the runlevels list. The second line contains a description for the service, and may be extended across multiple lines with backslash con- tinuation. 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 prior- ity should be 80. You should be able to figure out what the descrip- tion says; the \ causes the line to be continued. The extra space in front of the line is ignored. Will.
>From the chkconfig man page:Each service which should be manageable by chkconfig needs two or more commented lines added to its init.d script. The first line tells chkconfig what runlevels the service should be started in by default, as well as the start and stop pri- ority levels. If the service should not, by default, be started in any runlevels, a - should be used in place of the run- levels list. The second line contains a description for the service, and may be extended across multiple lines with back- slash continuation. 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. I'm trying to create an initialization scrip in the /etc/init.d/. Of course, the one I have is failing! At the top of the other initialization scripts in the same directory, there is are two lines, the chkconfig and description # chkconfig: 2345 55 25 # description: OpenSSH server daemon On the check config line, what are the numbers/attributes that follow? If I'm creating an initialization script, what numbers/considerations should I make? Thanks, Todd -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20070215/d38b7bb3/attachment.html>