LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-16-2005, 11:28 AM   #1
Fritz_Monroe
Member
 
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 276

Rep: Reputation: 31
running dhcpd at boot time


I'm a Windoze system admin trying to learn linux. I've finally taken the plunge and switched my Win2k server at home over to Slackware 10.0. I was using this server for DHCP on my home network and have just gotten Slackware set up to do this as well. It works great for this, but I don't know how to get it set up so dhcpd runs at boot time. It took some digging to figure out how to get DHCP set up, and I've found that I can add it to rc.local. rc.local is executable and I've added the command /usr/sbin/dhcpd to it but it still doesn't run at boot time.

Is there a specific format to this file? Do I have to do something other than just putting the command in there? Does this need to be run in the background?

Thanks

F_M
 
Old 06-16-2005, 11:43 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
The rc.local file already exists, so I assume that it's in the right place. The format is just a shell script, a bit like a BATch file in Windows but rather more flexible. For more information type this into an xterm:
Code:
man bash
Most daemons need to be run in the background, which means you probably want to do this:
Code:
/usr/sbin/dhcpd &
 
Old 06-16-2005, 11:59 AM   #3
Fritz_Monroe
Member
 
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 276

Original Poster
Rep: Reputation: 31
I'll give it a shot when I get home. I tried
Code:
man rc.local
but of course that didn't work.

I also thought that it might have needed the &, but I didn't think about it until I got to work today.

Thanks for the quick response. This is something I definately like about Linux. Do some homework, then ask your question and people are very willing to help. Thanks again.

F_M
 
Old 06-16-2005, 12:06 PM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Quote:
Originally posted by Fritz_Monroe
I'll give it a shot when I get home. I tried
Code:
man rc.local
but of course that didn't work.
The manpages you might be interested in are boot and possibly init initscript and inittab.

Every distro is different, so it's not easy to generalise about how these things work, but the rc.local script is usually called by rc, rc.sysinit or some similar script.

Also you might want to try this:
Code:
/usr/sbin/dhcpd 2>&1 >> /var/log/dhcpdstart.log &
That should log any errors etc. to /var/log/dhcpdstart.log, to save you having to trawl through other log files. If that file's not being created then dhcpd isn't getting run.
 
Old 06-16-2005, 12:31 PM   #5
objorkum
Member
 
Registered: Aug 2003
Location: Norway
Distribution: Slackware 10.0
Posts: 231

Rep: Reputation: 30
Re: running dhcpd at boot time

Quote:
Originally posted by Fritz_Monroe
I'm a Windoze system admin trying to learn linux. I've finally taken the plunge and switched my Win2k server at home over to Slackware 10.0. I was using this server for DHCP on my home network and have just gotten Slackware set up to do this as well. It works great for this, but I don't know how to get it set up so dhcpd runs at boot time. It took some digging to figure out how to get DHCP set up, and I've found that I can add it to rc.local. rc.local is executable and I've added the command /usr/sbin/dhcpd to it but it still doesn't run at boot time.

Is there a specific format to this file? Do I have to do something other than just putting the command in there? Does this need to be run in the background?

Thanks

F_M
One of my servers ran DHCPd, and I just put /usr/sbin/dhcpd in /etc/rc.d/rc.local and it worked perfectly.

There is no special format for that file, it's just a regular bash-file.

Can you post your rc.local here?
 
Old 06-16-2005, 12:36 PM   #6
Fritz_Monroe
Member
 
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 276

Original Poster
Rep: Reputation: 31
My rc.local file is empty except for the 2 or 3 commented out lines about this being the place to add commands. I'll still put it in here if you want, but I don't think it will help since it's empty.

The funny thing is I've read about newbies having lots of problems with sendmail, and I set that up the other day and it took all of about 5 minutes to do it all. DHCP seems to be very simple to get up and running and I'm having all kinds of trouble.

F_M
 
Old 06-16-2005, 06:43 PM   #7
Fritz_Monroe
Member
 
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 276

Original Poster
Rep: Reputation: 31
Problem solved

Well, I added the & and works like a charm. Thanks for the help.

F_M
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Newbie question - running a script at boot time Napalm Llama Red Hat 8 04-19-2005 03:11 PM
How to Do the Following? Running Script at Boot-Time + Sending Mail LinuxGeek Linux - General 1 07-20-2004 12:06 AM
Problems with running a deamon at boot time e0n Linux - Software 9 05-06-2003 07:48 PM
running DHCPD as non-root (RH 8.0) Pauly Linux - Networking 0 03-07-2003 11:35 AM
Running scripts at boot time saintt Linux - Software 1 08-09-2002 05:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:49 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