Problem: dnsmasq.init / dhcp-user-script not executed

Bastian Bittorf bb at npl.de
Wed Nov 10 23:36:46 PST 2021


Introduced with:

---
commit 8b486ec2b52056b737a4ce64a2040a9a27a6bd60
Author: Hans Dedecker <dedeckeh at gmail.com>
Date:   Fri Jun 9 16:24:12 2017 +0200

    dnsmasq: add dhcp-script hook conditionally
---

breaks parsing of user provided dhcp-script for me:

uci set dhcp. at dnsmasq[0].dhcpscript='/etc/dhcp-script.d/10dhcpscript'
/etc/init.d/dnsmasq restart

but in generated configfile we always have the default:
/usr/lib/dnsmasq/dhcp-script.sh

A fix in line 994 of package/network/services/dnsmasq/files/dnsmasq.init can be:

config_get user_dhcpscript $cfg dhcpscript
  if has_handler || [ -n "$user_dhcpscript" ]; then
  xappend "--dhcp-script=$DHCPSCRIPT"

TO:

config_get user_dhcpscript $cfg dhcpscript
  if has_handler || [ -n "$user_dhcpscript" ]; then
  xappend "--dhcp-script=$user_dhcpscript"

but maybe this breaks the default script?!

bye, Bastian



More information about the openwrt-devel mailing list