LinuxQuestions.org
Help answer threads with 0 replies.
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 06-21-2005, 11:08 PM   #1
michiaki
LQ Newbie
 
Registered: Jun 2005
Distribution: debian
Posts: 5

Rep: Reputation: 0
dhclient needed every time i boot to get internet


every time i boot my laptop (compaq presario 1215 with debian sarge) i need to run "dhclient" to get access to the internet. i went through a lot of reading to try and get my PCMCIA NIC working, but after a shot in the dark it turned out that's all i needed to do. i don't want to have to do it every time i start up though!!

thanks,
michiaki
 
Old 06-21-2005, 11:30 PM   #2
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
im guessing you are runnign gentoo.. you can add the dhclient comamnd to the rc.local file to run on startup.

/etc/rc.d/rc.local You need to add the full path to dhclint though which is probably /sbin/dhclient
 
Old 06-21-2005, 11:33 PM   #3
michiaki
LQ Newbie
 
Registered: Jun 2005
Distribution: debian
Posts: 5

Original Poster
Rep: Reputation: 0
im using debian sarge... i've looked in /etc/rc* and found /etc/rc0 through /etc/rc6 and /etc/rcS...
im assuming this corresponds to different runlevels?
where should dhclient go in that case?
 
Old 06-22-2005, 12:13 AM   #4
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
Debian dont use a rc.local file.
To create a simple rc.local equivalent in debian create a file in /etc/init.d/ called local as user root.
The file should have

#! /bin/bash
dhclient

and any other commands you wish to run at startup. Then make it executable:

chmod +x /etc/init.d/local

Then link the new file by running:

update-rc.d local defaults 60

You can change the last variable 60 to a lower number if you wish. The lower the number the sooner it will execute. I say 60 becuase at that point the rest of the system will be up and running. If you choose to low of a number some critical processes may not be started and dhclient wont run.
Now reboot. Whatever is in this file now will execute during bootup.

More info look at http://www.debian.org/doc/FAQ/ch-customizing.en.html
Section 10.6

Last edited by Zero-0-Effect; 06-26-2005 at 09:37 PM.
 
Old 06-22-2005, 12:42 PM   #5
michiaki
LQ Newbie
 
Registered: Jun 2005
Distribution: debian
Posts: 5

Original Poster
Rep: Reputation: 0
thanks that fixed it
 
Old 06-26-2005, 09:37 PM   #6
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
Just noticed I messed up that first line for that script.
Should be

#! /bin/bash

Didnt catch the typo.
 
  


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
dhclient shows IP, but internet including ping wont work mjkelly93 Linux - Networking 1 10-09-2005 08:46 AM
How do I start dhclient automatically at boot-up? moonmoth Linux - Networking 4 07-17-2005 05:15 AM
Time Delay program needed koby *BSD 2 06-14-2005 12:14 PM
dhclient / cant use keyboard on internet toastermaker Linux - Networking 6 06-04-2004 02:15 AM
Cannot conect to the internet. ¿dhclient? Guayacan Linux - Networking 1 01-01-2004 05:45 PM


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