LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-16-2002, 07:57 PM   #1
jkcunningham
Member
 
Registered: May 2002
Location: Seattle, WA, USA
Distribution: Gentoo
Posts: 136

Rep: Reputation: 15
How to start dhcpd at boot up


How do I run the command "#rcdhcpd start" when the system boots? This daemon needs to be launched as root.

Thanks.
Jeff
 
Old 11-16-2002, 08:57 PM   #2
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Rep: Reputation: 30
/etc/rc.config ?

/etc/rc.config:

START_DHCPD="yes"
 
Old 11-16-2002, 10:44 PM   #3
jkcunningham
Member
 
Registered: May 2002
Location: Seattle, WA, USA
Distribution: Gentoo
Posts: 136

Original Poster
Rep: Reputation: 15
Thanks for the response. Unfortunately, my system (suse 8.1) doesn't have an /etc/rc.config file. It has an /etc/rc.d/rc file, but I looked in it and it doesn't look like the place to put anything. It has a whole series of /etc/rc.d/rc<n>.d/ directories, where <n> is 1,2,...,6, and inside are symlinks to scripts.
 
Old 11-16-2002, 11:22 PM   #4
RijilV
Member
 
Registered: Sep 2002
Location: somewhere
Distribution: gentoo
Posts: 123

Rep: Reputation: 15
yeah, rc.config is for "bsd-style" init scripts. you're using "Sys-V-style" init scripts.

you have a few options, either put it in /etc/init.d/rc.local or whatever SuSE "pro" decides to call it

or if you installed dhcpd from whatever binary package management system that SuSE "pro" uses, it should have put a init file in /etc/init.d/ and all you have to do is make the appropiate links to your /etc/rc#.d/ dirs (or use whatever program that SuSE "pro" wants you to use for all that)

or if you installed it from source, you'll need to write your own init script. If SuSE "pro" is halfway decent they should have provided you with a template or skeleton init script for you to use, otherwise you'll have to either copy and paste one of them or start from scratch.

the easiest thing is to just tack it on the end of your rc.local, or whatever SuSE "pro" calls it...
 
Old 11-16-2002, 11:36 PM   #5
jkcunningham
Member
 
Registered: May 2002
Location: Seattle, WA, USA
Distribution: Gentoo
Posts: 136

Original Poster
Rep: Reputation: 15
Okay, now that you've established your contempt for 'SuSE "pro"' for reasons that I don't understand but don't really interest me a whole lot, perhaps you - or someone else less contemptious - wouldn't mind explaining the naming system of the symlinks in the /etc/init.d/rc#.d/ directories. Obviously the # refers to run level, I believe the links inside get executed when it enters that run level. And given that they are all named either S##<appname> or K##<appname>, should I assume that the S's run the <appname> script with a "start" arguement and the K's run the <appname> with a "stop" argument? If so, what are the numbers? The order they execute in? But I notice some use the same numbers and differ only by appname. I hate to just go sticking one in there without knowing what I'm doing. Might break something...
 
Old 11-17-2002, 06:08 AM   #6
RijilV
Member
 
Registered: Sep 2002
Location: somewhere
Distribution: gentoo
Posts: 123

Rep: Reputation: 15
S is for start, K is for kill.

the second number is the order in which it is started... 01 is first, 99 is last.. so for dhcpd you'll want it after your network, and depending on your setup you might want it after services like bind or even tftpd.

things can be on the same number, then they are typically alphebetical
 
Old 11-17-2002, 12:39 PM   #7
jkcunningham
Member
 
Registered: May 2002
Location: Seattle, WA, USA
Distribution: Gentoo
Posts: 136

Original Poster
Rep: Reputation: 15
Rijilv: Thank you. I kind of thought that's how it went, but I wasn't sure and have never run across an explanation.

Now I'm in business.

Regards,
-Jeff
 
Old 11-21-2002, 02:30 AM   #8
dansen
LQ Newbie
 
Registered: Nov 2002
Distribution: suse7.1
Posts: 24

Rep: Reputation: 15
I have the same problem you had
But if u say suse i`m gone be crazy

may question is how you have get lost your problem
because i don`t get the explenation above??

How do i make a appropiate link in the file /etc/init.d/
and how can i call the file ????.????
 
Old 11-21-2002, 09:31 AM   #9
jkcunningham
Member
 
Registered: May 2002
Location: Seattle, WA, USA
Distribution: Gentoo
Posts: 136

Original Poster
Rep: Reputation: 15
In SuSE 8.1 you create four links:
# ln -s /usr/sbin/rcdhcpd /etc/init.d/rc3.d/S20rcdhcpd
# ln -s /usr/sbin/rcdhcpd /etc/init.d/rc3.d/K05rcdhcpd
# ln -s /usr/sbin/rcdhcpd /etc/init.d/rc5.d/S20rcdhcpd
# ln -s /usr/sbin/rcdhcpd /etc/init.d/rc5.d/K05rcdhcpd
If you don't have a SuSE distribution, these rc#.d directories might have a slightly different path. Redhat's is slightly different. Find them and modify the above links accordingly. You might need to modifiy the numbers I used (05, 20). I picked 20 so it starts after everything else (the splash image was 21 so I picked 20). You generally want to kill things in the opposite order, so I picked 05, before everything else.

These scripts will be called automatically with arguments 'start' for the S## paths when the system boots to runlevels 3 or 5, and with 'stop' for the K## paths as it shutsdown. To get it to work the first time, either reboot, or just manually launch it with:
# rcdhcpd start
 
  


Reply



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
getting dhcpd to start automatically (FC3) acgi Linux - Networking 1 10-10-2005 09:58 AM
Start DHCPd and configure iptables on boot (Debian Sarge) Qis Linux - Networking 6 03-02-2005 05:34 AM
dhcpd can not start vito_huang Linux - Networking 2 02-15-2005 03:41 PM
dhcpd will not start odious1 Linux - Networking 1 04-08-2004 03:13 PM
Don't want dhcpd to start on startup rech Slackware 1 11-09-2003 12:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:30 PM.

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