udhcpc后台运行的方法【总结】.pdf

  1. 1、本文档共8页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
udhcpc 后台运行的方法【总结】 udhcpc 后台运行的方法【总结】 2010-11-30 11:13:27| 分类: dhcp | 标签: |字号大中 小 订阅 最近在做项目的时候卡在了 dhcp 处,当没有网络 的时候,板子一直发送 dhcp 请求,导致程序不往下执行, 解决的办法是把它切换到后台运行,可是如何切换到后台呢, 有办法,它自带参数可以实现该功能。如下: udhcpc -b -i eth0 -p /var/run/udhcpc.pid 解释一下, -b 就是切换到后台指令, -i 是指定使用哪个网络 接口,双网卡的时候一定要使用它来指定 eth0 or eth1 。 业务不熟练害死人啊,所以只要多看看源码,一般问题都能 搞定。 下面引用网友的一篇文章: udhcpc 的配置记录 udhcpc scripts Here's some debian scripts I wrote for udhcpc 0.9.6. I wanted to make it easy to run local scripts for DHCP changes so I created /etc/udhcpc.d. All the /usr/share/udhcpc/default.* scripts have been merged into /etc/udhcpc.d/S50default. S99local is an example script that patches resolv.conf and calls a DNS update script. /etc/init.d/udhcpc /etc/udhcpc.script /etc/udhcpc.d/S50default /etc/udhcpc.d/S99localLast modified: Mon Feb 4 10:23:49 PST 2002 单调的分割线 /README.udhcpc udhcp client (udhcpc) The udhcp client negotiates a lease with the DHCP server and notifies a set of scripts when a leases is obtained or mand line options The command line options for the udhcp client are:-c, --clientid=CLIENTID Client identifier -H, --hostname=HOSTNAME Client hostname -h, Alias for -H -f, --foreground Do not fork after getting lease -b, --background Fork to background if lease cannot be immediately negotiated. -i, --interface=INTERFACE Interface to use (default: eth0) -n, --now Exit with failure if lease cannot be immediately negotiated. -p, --pidfile=file Store process ID of daemon i

文档评论(0)

星帅 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档