openwrt中的dnsmasq包含有dhcp server和dns的功能,dnsmasq是动态启动的,当网络状态发送变化是会重新启动dnsmasq,启动脚本为/etc/hotpulg.d/iface/25-dnsmasq。dnsmasq脚本启动时会先生成dnsmasq的配置文件,当网络变化频繁时,可能会同时出现多个生成配置文件的过程,写同一个配置文件导致后面关于dhcp的配置丢失,从而导致dhcp server的功能不正常。
修正该问题的方法是配置package/network/services/dnsmasq/files/dnsmasq.hotplug,将启动方式由start改为restart,之后几乎未在出现类似问题。
http://blog.chinaunix.net/uid-31410005-id-5772433.html
https://blog.csdn.net/u013401853/article/details/80345846
https://gitee.com/netweather/dnsmasq
https://www.right.com.cn/forum/thread-4096536-2-1.html
https://openwrt.org/es/doc/howto/dhcp.dnsmasq
https://blog.csdn.net/rav009/article/details/78873788
https://github.com/search?p=4&q=dnsmasq&type=Repositories
https://segmentfault.com/q/1010000024475575
openwrt里面的高深代码-两行shell脚本_u013401853的专栏-CSDN博客
https://gitee.com/netweather/dnsmasq
https://www.right.com.cn/forum/thread-4096536-2-1.html
https://openwrt.org/es/doc/howto/dhcp.dnsmasq
Linux 2>&1 >&- 这种的含义_rav009的专栏-CSDN博客
https://github.com/search?p=4&q=dnsmasq&type=Repositories
https://segmentfault.com/q/1010000024475575
#!/bin/sh
[ "$ACTION" = ifup ] || exit 0
/etc/init.d/dnsmasq enabled && /etc/init.d/dnsmasq restart
————————————————
版权声明:本文为CSDN博主「wwx0715」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wwx0715/article/details/53126879