View previous topic :: View next topic |
Author |
Message |
thaldyron Apprentice
Joined: 25 Sep 2002 Posts: 227 Location: On Earth
|
Posted: Wed Jan 22, 2003 2:01 pm Post subject: waiting for dhcp |
|
|
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 |
|
|
thaldyron Apprentice
Joined: 25 Sep 2002 Posts: 227 Location: On Earth
|
Posted: Wed Jan 22, 2003 2:31 pm Post subject: |
|
|
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 |
|
|
MadEagle n00b
Joined: 03 Jun 2002 Posts: 59 Location: Hamburg, Germany
|
Posted: Wed Jan 22, 2003 2:35 pm Post subject: |
|
|
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 |
|
|
thaldyron Apprentice
Joined: 25 Sep 2002 Posts: 227 Location: On Earth
|
Posted: Wed Jan 22, 2003 10:30 pm Post subject: |
|
|
Thanks, finally a clean solution! |
|
Back to top |
|
|
|