WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: dhcp client starts to late  (Read 4628 times)

Offline ananix

  • Full Member
  • ***
  • Posts: 174
dhcp client starts to late
« on: April 10, 2014, 09:40:16 AM »
Hello, im making a RDP terminal and want it to connect right after desktop start, but my dhcp request is far from done when getting to that stage, i can see in dhcp.sh the behavior is changed so it does not wait doing boot, but i want it to wait with starting X unto i got my network up and running.
Is there a nice way to make it behave like that again?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: dhcp client starts to late
« Reply #1 on: April 10, 2014, 09:57:53 AM »
You can run a script from /opt/bootsync.sh that waits for the IP address to be assigned.

#waitip
SEC=60
while [ $SEC -gt 0 ]  ; do
   ifconfig | grep -q "Bcast:" && break
   echo -ne "Waiting for IP $(( SEC-- ))  \r"
   sleep 1
done
echo
 

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: dhcp client starts to late
« Reply #2 on: April 10, 2014, 10:20:26 AM »
ok will do that thanks