How to run udhcp in background for imx6_yocto ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to run udhcp in background for imx6_yocto ?

862件の閲覧回数
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 ?

ラベル(1)
0 件の賞賛
返信
1 返信

647件の閲覧回数
b36401
NXP Employee
NXP Employee

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 件の賞賛
返信