Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
waiting for dhcp
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
thaldyron
Apprentice
Apprentice


Joined: 25 Sep 2002
Posts: 227
Location: On Earth

PostPosted: Wed Jan 22, 2003 2:01 pm    Post subject: waiting for dhcp Reply with quote

That's my problem:
To get online I first have to receive information from the local DHCP, then i connect with pptp.
For convenience i put the pptp command in my local.start. Yesterday i decided to give "prelink" a try and now the system seems to boot up a lot faster. Maybe too fast, because when the local.start script gets read, i haven't received my IP from the DHCP server yet -> (network unreachable error). When i connect manually after the boot up it works of course.
Anyone knows a way how to delay the pptp connection attempt till i've received my local ip from the DHCP?
Back to top
View user's profile Send private message
thaldyron
Apprentice
Apprentice


Joined: 25 Sep 2002
Posts: 227
Location: On Earth

PostPosted: Wed Jan 22, 2003 2:31 pm    Post subject: Reply with quote

Solved it with a sleep (running in the background so it doesn't block everything else):
sleep 20 && pptp server name username &
Back to top
View user's profile Send private message
MadEagle
n00b
n00b


Joined: 03 Jun 2002
Posts: 59
Location: Hamburg, Germany

PostPosted: Wed Jan 22, 2003 2:35 pm    Post subject: Reply with quote

Remove the start of your pptp connection from local.start and put the following in to /etc/init.d/pptp:

Code:
depend() {
   need net
}

start() {
   # pptp start call
}


Then add this new "service" to your default runlevel
Code:
rc-update add pptp default


This automagically calculates the service dependencies and won't start your pptp connection before the net script (where the dhcpd is started) is finished.

MadEagle

P.S. This is not tested, you might have to tweak it.
Back to top
View user's profile Send private message
thaldyron
Apprentice
Apprentice


Joined: 25 Sep 2002
Posts: 227
Location: On Earth

PostPosted: Wed Jan 22, 2003 10:30 pm    Post subject: Reply with quote

:) Thanks, finally a clean solution!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum