Hi Folks,
I have a couple of questions on start/stop of a toe card (a) using chkconfig and (b) manually. I'm really new to such system level configuration, so any help would be be much appreciated!! Thanks.
--------------------- Question-1 ---------------------------------------------------
I'm trying to configure the start/stop of a toe card. I'm running CentOS 4.4 The initialization script for the service has the appropriate start(), stop() subroutines and the header:
==============================================
#!/bin/bash
#
# toe: init V script for the toe card
#
# chkconfig: 345 15 15
# config: /etc/toe.conf
#
### BEGIN INIT INFO
# Required-Start: $network
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
### END INIT INFO
# code here start(0 stop() etc
================================================
---> I tried using chkconfig --add but got an error message stating that "service toeCard does not support chkconfig". How do I proceed in figuring out what's wrong?
-------------------- Question-2 ----------------------------------------------
Since I got an error above, I would like to try setting it up manually. So I intend doing the following (and would appreciate any comments on correctness of the procedure):
1. Copy the initialiaztion script to /etc/rc.d/init.d
2. Decide on the (a) run-levels, (b) start priority, and (c) stop priority for this service,
3. For each of the run-levels, create a symbolic link to the /etc/rc.d/init.d/toeCard initialiaztion script. For eg., for run-level 3, and start/stop priorities of 15 each, I would:
% ln -s /etc/rc.d/init.d/toeCard /etc/rc.d/rc3.d/S15toeCard
% ln -s /etc/rc.d/init.d/toeCard /etc/rc.d/rc3.d/K15toeCard
and I would repeat it for all the runlevels I need ie create symbolic links to /etc/rc.d/rc[n].d/[S,K][p]toeCard, where n=runlevel, p=priority, for start(S) and stop(K).
Browsing through the web, the above is what I could gather. Just to be sure, I had a few other questions:
--> The directories /etc/rc[n].d are symbolic links to /etc/rc.d/rc[n].d, so I guess I don't need to anything here?
--> How do I handle the halt(=0), single-user(=1) & reboot(=6) runlevels? (see below)
Based on my uderstanding, I also need to do the following
% ln -s /etc/rc.d/init.d/toeCard /etc/rc.d/rc0.d/K15toeCard
to set the halt/shutdown. And, then, same for reboot,
% ln -s /etc/rc.d/init.d/toeCard /etc/rc.d/rc6.d/K15toeCard
Right? And as I understand things, I don't need to create special links S15toeCard in either rc0.d nor rc6.d. Right?
Any help would be much appreciated!!!! Thanks.
=================
Related Info:
http://www.linuxquestions.org/questi...ight=chkconfig