How to run udhcp in background for imx6_yocto ?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run udhcp in background for imx6_yocto ?

380 Views
haemachandars
Contributor I

I'm using imx6 sabreliteauto with Yocto Linux kernel 3.10.17 and recipe is core-image-x11. The udhcp is used for the getting the dhcp of the eth0 interface at the boot. After booting , If I remove and reconnect the ethernet interface. The udhcp is not run again and no leases file are generated (as in dhclient). I have to manually run the udhcp again to update the dhcp of ethernet interface. How to run the udhcp in background ?

Labels (1)
0 Kudos
1 Reply

165 Views
b36401
NXP TechSupport
NXP TechSupport

You can run in background something like this:

# tail -1f /var/log/messages | grep "link becomes ready" | awk '{system("/sbin/udhcpc")}'

It cyclically waits for "link becomes ready" appears in /var/log/messages and then runs udhcpc program.

Have a great day,

Victor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos