- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
udhcpc 后台运行的方法【总结】
udhcpc 后台运行的方法【总结】
2010-11-30 11:13:27| 分类: dhcp | 标签: |字号大中
小 订阅 最近在做项目的时候卡在了dhcp
小 订阅 最近在做项目的时候卡在了
dhcp 处,当没有网络
的时候,板子一直发送 dhcp 请求,导致程序不往下执行, 解决的办法是把它切换到后台运行,可是如何切换到后台呢, 有办法,它自带参数可以实现该功能。如下:
udhcpc -b -i eth0 -p /var/run/udhcpc.pid
解释一下, -b 就是切换到后台指令, -i 是指定使用哪个网络 业务不熟练害死人啊,所以只要多看看源码,一般问题都能 搞定。
接口,双网卡的时候一定要使用它来指定eth0 or eth1
接口,双网卡的时候一定要使用它来指定
eth0 or eth1 。
面引用网友的一篇文章:
udhcpc 的配置记录
udhcpc scripts
Heres 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 scriptthat 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
Client identifierThe command line options for the udhcp
Client identifier
client are:-c, --clientid=CLIENTID lease cannot be
-H, --
-H, --hostname=HOSTNAME
Client hostname
-h, Alias for -H-f, --foreground
-h, Alias for -H
-f, --foreground
Do not fork after getting
lease
-b, --
-b, --background
Fork to background if
immediately
negotiated.
-i, --interface=INTERFACEInterface to use (default:eth0)-n, --nowExit with failure if leasecannot beimmediatelynegotiated.-p, --pidfile=file
-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
in file
-q, --quit
Quit after obtaining lease
-r, --request=IP
IP address to request
(default: none)
-s, --
-s, --script=file
Run file at dhcp events
(default:
-v, --
-v, --version
Display versionIf the
requested IP address cannot be obtained, the client accepts the address that the serve
您可能关注的文档
最近下载
- 强迫障碍的相关护理.docx VIP
- 高标准基本农田项目中测绘的重难点及应对策略.pdf VIP
- 经典规范的股权代持协议.docx VIP
- 铜转炉渣湿法回钴.doc VIP
- 2025年教师科学考试试题及答案.doc
- 中国茶文化PPT课件教学.pptx VIP
- ASHRAE-TC9.9-2016数据中心功率设备热管理手册及实践Data Center Power Equipment Thermal Guidelines and Best Practices.pdf
- 手术室护理查房.ppt VIP
- (统编2026新教材)三年级道法上册第4课《科技力量大》课件.pptx
- IT运维综合管理平台建设方案.doc VIP
文档评论(0)