The service does not support the solution of chkconfig

  

When chkconfig –add servername, the service is always not supported by chkconfig. The solution is as follows: 1. Example, the first three lines of auto_run are as follows: #!/bin/sh #chkconfig: 2345 80 90#description: The first line of auto_run tells the system which shell to use, so the shell scripts are like this. The second line, chkconfig has three parameters 2345, 80 and 90 to tell the chkconfig program, you need to create a file connection named S80auto_run in the rc2.d~rc5.d directory, connect to /etc/rc.d/init.d The auto_run script under the directory. The first character is S. When the system starts, it runs the script auto_run and adds a start parameter to tell the script that it is now in startup mode. At the same time in the rc0.d and rc6.d directory, create a file connection named K90auto_run, the first character is K, when the system shuts down the system, it will run auto_run, add a stop, tell the script, it is now off mode . Note that the above three lines are in the middle, the second line, the third line is required, otherwise it will report an error when running chkconfig –add auto_run. 2. Common mistakes “ The service does not support chkconfig”: Please check the front of the script to see if there are two complete lines: #chkconfig: 2345 80 90#description:auto_run These two lines are in front of the script, otherwise they cannot The chkconfig command will report an error. If running chkconfig always gives an error, if the script is no problem, I suggest that the file connection to the script is created directly under rc0.d~rc6.d, the principle is the same

Copyright © Windows knowledge All Rights Reserved