LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-22-2007, 04:50 PM   #1
itnaa
Member
 
Registered: Dec 2006
Distribution: CentOS 4.4 (2.6.9-42.0.2.ELsmp)
Posts: 55

Rep: Reputation: 15
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
 
Old 07-22-2007, 06:23 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Does your NIC card have a toe chip?
 
Old 07-22-2007, 08:39 PM   #3
itnaa
Member
 
Registered: Dec 2006
Distribution: CentOS 4.4 (2.6.9-42.0.2.ELsmp)
Posts: 55

Original Poster
Rep: Reputation: 15
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.

Last edited by itnaa; 07-22-2007 at 08:57 PM.
 
Old 07-23-2007, 01:08 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 07-23-2007, 09:44 AM   #5
itnaa
Member
 
Registered: Dec 2006
Distribution: CentOS 4.4 (2.6.9-42.0.2.ELsmp)
Posts: 55

Original Poster
Rep: Reputation: 15
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.
 
Old 07-23-2007, 05:00 PM   #6
itnaa
Member
 
Registered: Dec 2006
Distribution: CentOS 4.4 (2.6.9-42.0.2.ELsmp)
Posts: 55

Original Poster
Rep: Reputation: 15
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!!
 
  


Reply

Tags
chkconfig, initd, magic, nic, rcd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone using LeWiz 10g NIC with TOE .. ngsol Linux - Networking 0 09-12-2006 10:04 AM
creating an interoperable program for Tic tac toe sachitha Programming 2 08-25-2006 11:56 AM
Dipping my toe ImpelGD LinuxQuestions.org Member Intro 3 01-09-2006 03:42 PM
the ethernet card modules aren't loaded automatically exa Mandriva 2 05-20-2005 08:58 AM
Bringing up unknown LAN card ivanatora Linux - Networking 3 09-30-2003 04:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration