Tiny Core Linux

Tiny Core Base => TCB Tips & Tricks => Topic started by: ananix on April 10, 2014, 09:40:16 AM

Title: dhcp client starts to late
Post by: ananix 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?
Title: Re: dhcp client starts to late
Post by: gerald_clark 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
 
Title: Re: dhcp client starts to late
Post by: ananix on April 10, 2014, 10:20:26 AM
ok will do that thanks