From 3e299b29b9d0b1aaa17d1f950a6ef62676541c40 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Wed, 26 Feb 2025 16:56:38 +0100 Subject: [PATCH] dnsmasq/unbound - mark 'template reload' action as cleanup. Ideally these spots should not be needed as the frontend generates the configuration and on boot these are flushed as well, ... but, when interfaces change during boot or triggered by the wizard, these parts are not aware of these facts. as discussed with @fichtner --- src/etc/inc/plugins.inc.d/dnsmasq.inc | 3 +++ src/etc/inc/plugins.inc.d/unbound.inc | 1 + 2 files changed, 4 insertions(+) diff --git a/src/etc/inc/plugins.inc.d/dnsmasq.inc b/src/etc/inc/plugins.inc.d/dnsmasq.inc index 56def1751..7625d1dde 100644 --- a/src/etc/inc/plugins.inc.d/dnsmasq.inc +++ b/src/etc/inc/plugins.inc.d/dnsmasq.inc @@ -150,6 +150,9 @@ function dnsmasq_configure_do($verbose = false) _dnsmasq_add_host_entries(); + /* XXX: cleanup, should have been run, but interface changes during boot or wizard are messing things up */ + configd_run('template reload OPNsense/Dnsmasq'); + mwexec('/usr/local/etc/rc.d/dnsmasq start'); if (!empty($config['dnsmasq']['regdhcp'])) { diff --git a/src/etc/inc/plugins.inc.d/unbound.inc b/src/etc/inc/plugins.inc.d/unbound.inc index 4f4e6e955..38e74e1f0 100644 --- a/src/etc/inc/plugins.inc.d/unbound.inc +++ b/src/etc/inc/plugins.inc.d/unbound.inc @@ -350,6 +350,7 @@ EOD; chmod($root_hints_tmp, 0644); rename($root_hints_tmp, '/var/unbound/root.hints'); + /* XXX: cleanup, should have been run, but interface changes during boot or wizard are messing things up */ configd_run('template reload OPNsense/Unbound/*'); }