Bringing up a TOE Card Automatically...
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 |
Does your NIC card have a toe chip?
|
Not sure what you mean by a chip, perhaps that it does TCP offloading? The card I have is:
http://www.lewiz.com/magic2028-2p.html Thanks. Edit: Yes, it does have a chip. |
According to the link you posted, it does.
I compared your header comments with one for another daemon on a laptop with Fedora Core 6 and didn't see any difference. Check if the scripts shouldn't be in /etc/init.d/ instead of /etc/rc.d/init.d, although one may be a link to the other. |
Checked it out and as you suspect, one is symbolically linked to the other:
lrwxrwxrwx 1 root root 11 Jul 17 12:06 init.d -> rc.d/init.d I went through several other initialization scripts and find that often the function-script is sourced, as: # Source function library. . /etc/rc.d/init.d/functions So, a naive question is whether the toeCard script also requires this? I realize that this is probably a foolish Q. on my part since it probably depends on whether functions within the script are really using the function-script. Nevertheless since I don't fully understand the setup thought I'd ask... Many thanks for your help. Appreciate it. |
Ok. I finally managed to get the auto-boot through chkconfig working. Strangely, chkconfig did not like the fact that I had skipped the "description" directive in the initialization header, as in:
# description: Some snippet After inserting this below the "config" directive, it worked. Thanks for your help... now I have to deal with the crashes I'm suffering when stopping the toe card!! |
All times are GMT -5. The time now is 02:40 AM. |