udhcpc 获取不到ip地址
正确输出
/etc/udhcpc # udhcpc -i wlan0
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending select for 192.168.0.57
udhcpc: lease of 192.168.0.57 obtained, lease time 6151
deleting routers
route: SIOCDELRT: No such process
adding dns 192.168.0.1
错误输出
/opt/ko # uchcpc -i wlan0
-sh: uchcpc: not found
/opt/ko # udhcpc -i wlan0
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending select for 192.168.0.57
udhcpc: lease of 192.168.0.57 obtained, lease time 6765
获取不到IP原因:配置文件缺失
配置文件参考busybox
/home/wy/hisi/SS524V100_SDK_V2.0.0.3/open_source/busybox/busybox-1.31.1/examples/udhcp
文件系统的目录以及文件
/usr/share/udhcpc 目录下文件
/usr/share/udhcpc # ls
default.bound default.deconfig default.script
/etc/udhcpc 目录下文件
/etc/udhcpc # ls
resolv.conf
resolv.conf 文件内容
# cat resolv.conf
nameserver 192.168.0.1