Bug 132 - dhcp fails in netbook
Summary: dhcp fails in netbook
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 0.9
Hardware: x86 Multiple
: Medium normal
Target Milestone: 0.9 M3
Assignee: Qing He
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-07-20 19:34 UTC by liping Ke
Modified: 2010-12-21 06:09 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified: Program Management
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description liping Ke 2010-07-20 19:34:57 UTC
Hi, after I installed realtek netbook driver, still I can't see ip is setup.
I have to mannually setup ip by ifconfig eth0 10.239.XX.XX.
It's said dhcclient does not work.

Could somebody help to have a look at the problem?

Thanks a lot!
criping
Comment 1 Qing He 2010-07-28 17:52:56 UTC
I've reproduced the bug on Dongxiao's box

the error is that /sbin/dhclient-script reports that it can't find ifconfig and route, with the following manual fix it passed and obtained IP correctly.
   s|\<ifconfig\>|/sbin/ifconfig|   s|\<route\>|/sbin/route|

It seems that /sbin/ isn't in the script search path. It can be added in the script directly, but should it be in the env?

btw, why the bug is marked closed? I checked the source repo but didn't find some commit addressing it.
Comment 2 liping Ke 2010-07-28 18:02:09 UTC
I will verify the bug status after I pull down the latest change this week when I have some time.

criping
Comment 3 Saul Wold 2010-07-28 19:10:13 UTC
Accidently marked as fixed, this need to be fixed and verified
Comment 4 Qing He 2010-07-28 22:31:24 UTC
root cauesd, the problem is a bug in dhcp4

when dhclient/dhc6 invokes /sbin/dhclient-script, it clears all environment variables but set only CLIENT_PATH, in dhcp-3.1.3, it reads in Makefile.conf:
    CLIENT_PATH = '"PATH=/usr/ucb:/usr/bin:/usr/sbin:/bin:/sbin"'

but in dhcp-4.1.1-P1, it looks in client/Makefile.am:
    $(COMPILE) -DCLIENT_PATH='"$(sbindir)"'

since we only copy dhclient into /sbin/ after installation, at build time, sbindir is still /usr/sbin, so search of ifconfig and route fails; further more, it should rather be -DCLIENT_PATH='"PATH=..."' to work properly
Comment 5 Qing He 2010-08-11 19:57:27 UTC
fixed in 5fba534b15baa3778bbce2952ac7664bcda4e73c
Comment 6 liping Ke 2010-08-11 20:04:57 UTC
verified on M2 image:
http://yoctobuild01.jf.intel.com/milestone/20100731-1/netbook/x86_32/

Thanks& Regards,
criping