LinuxQuestions.org
Review your favorite Linux distribution.
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 01-03-2001, 02:55 AM   #1
nine
LQ Newbie
 
Registered: Jan 2001
Posts: 2

Rep: Reputation: 0

I have just managed to get DHCPD working on my machine but I have to manually run it to get it started. What I want to do is have it startup automatically when Linux boots, much like if I added an entry to an autoexec.bat file. I have tried putting an entry into .bash_profile for root but this will only run when I log in as root.

Any assistance would be very much appreciated.

 
Old 01-06-2001, 12:24 PM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 12,448

Rep: Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329
You need to use a startup script for this. What distro are you running?
 
Old 01-06-2001, 09:17 PM   #3
nine
LQ Newbie
 
Registered: Jan 2001
Posts: 2

Original Poster
Rep: Reputation: 0
Distro

I'm using Mandrake 7.1

Any help is welcome.

pk
 
Old 01-09-2001, 06:04 PM   #4
Jasutinsama
Member
 
Registered: Jan 2001
Location: Pacific NW
Posts: 46

Rep: Reputation: 15
Lightbulb Good old linuxconf

You should be able to use the good ol' linuxconf in X to set the DHCP to run at boot. If not you may ave to edit one of the config files manually like net.config(or something(don't laugh at me)).

You might even be able to upgrade to Mandrake to 7.2 which has a nifty little cheater GUI that lets you setup DHCP. I connect using DHCP for my DSL and this took me about 2 minutes to setup and get online after install of 7.2.

___________
Jasutinsama<--dont listen to him he is just a newbie
 
Old 01-16-2001, 09:41 AM   #5
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 12,448

Rep: Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329
Create a file /etc/rc.d/init.d/dhcpd with the following content then make symlinks in the rcx.d dirs that you would like dhcpd to start in.

Quote:


#!/bin/sh
#
# dhcpd This shell script takes care of starting and stopping
# dhcpd.
#
# chkconfig: - 65 35
# description: dhcpd provide access to Dynamic Host Control Protocol.

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/sbin/dhcpd ] || exit 0
[ -f /etc/dhcpd.conf ] || exit 0

RETVAL=0

# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting dhcpd: "
daemon /usr/sbin/dhcpd eth1
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
;;
stop)
# Stop daemons.
echo -n "Shutting down dhcpd: "
killproc dhcpd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dhcpd
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
status)
status dhcpd
RETVAL=$?
;;
*)
echo "Usage: dhcpd {start|stop|restart|status}"
exit 1
esac

exit $RETVAL
 
  


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
daemons starting on bootup papajohns AIX 4 08-04-2004 02:27 PM
Starting services at bootup Lucasite Linux - Newbie 5 04-17-2004 03:08 PM
starting apache at bootup softgun Debian 11 08-05-2003 08:17 AM
Starting Telnet server at bootup bbusse Linux - General 1 03-05-2003 05:32 PM
starting programs at bootup tcm_va Linux - Newbie 5 02-08-2003 09:30 PM

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

All times are GMT -5. The time now is 09:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration