Hi,
sorry but my english is poor :( I'm from Spain
I have a little problem with command chkconfig.
I have a script named [b]carpald[/b] and his path is [b]/etc/rc.d/init.d/[/b].
I need use chkconfig with this script but when i write command:
chkconfig --add carpald
System message is:
[b]carpald service does not support chkconfig[/b]
With chkconfig the system configures a script to boot on startup runlevels that we indicate.
Can you help me, please?
thank you :)
problem with chkconfig
Re: problem with chkconfig
The chkconfig command is to update and query information for system services,
like httpd,mysqld ...
If you want to put your script to boot on startup runlevels t,you should write your script path in the file
called "/etc/rc.local", you may see this file carefully ~~~
Hope it would help you~~
like httpd,mysqld ...
If you want to put your script to boot on startup runlevels t,you should write your script path in the file
called "/etc/rc.local", you may see this file carefully ~~~
Hope it would help you~~
- WhatsHisName
- Posts: 1549
- Joined: 2005/12/19 20:21:43
- Location: /earth/usa/nj
Re: problem with chkconfig
For chkconfig to manage your script, you need to configure your script as described in the chkconfig manpage section RUNLEVEL FILES (at the end of the manpage).
Re: problem with chkconfig
chkconfig need 2 things in the head of your script
# chkconfig:
# description:
like [b]WhatsHisName[/b] say loot at the manual , taken from the manual :
[code]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 chkconfig 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 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. [/code]
# chkconfig:
# description:
like [b]WhatsHisName[/b] say loot at the manual , taken from the manual :
[code]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 chkconfig 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 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. [/code]
-
- Posts: 35
- Joined: 2009/05/21 07:18:38
Re: problem with chkconfig
You can use an existing script such as /etc/init.d/sshd as a template. Just change the chkconfig S and K parameters to match the desired behavior of the new service.
Re: problem with chkconfig
thank you
The problem was that he had wrote description with errors
The problem was that he had wrote description with errors
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: problem with chkconfig
For the record, a template file and its accompanying notes -- [b]/usr/share/doc/initscripts-8.45.30/sysvinitfiles[/b].