From 5ce68025b658d94c9d69ee59cc335fb606c9262e Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Fri, 21 Nov 2014 21:10:07 +0200 Subject: [PATCH 1/2] d DHCPLeases starting before Unbound/DNSMasq and returning a pid not found message. Add missing reload feature --- etc/inc/services.inc | 4 ++++ etc/inc/system.inc | 2 -- etc/inc/unbound.inc | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/etc/inc/services.inc b/etc/inc/services.inc index a7fdeb44b5..b8a99ae13d 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -1864,6 +1864,8 @@ function services_dnsmasq_configure() { mwexec_bg($cmd); unset($args); + system_dhcpleases_configure(); + if ($g['booting']) echo gettext("done.") . "\n"; } @@ -1903,6 +1905,8 @@ function services_unbound_configure() { sync_unbound_service(); if ($g['booting']) echo gettext("done.") . "\n"; + + system_dhcpleases_configure(); } if (!$g['booting']) { diff --git a/etc/inc/system.inc b/etc/inc/system.inc index babfb46a7c..fd927bdb6c 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -381,8 +381,6 @@ function system_hosts_generate() { unbound_hosts_generate(); } - system_dhcpleases_configure(); - return 0; } diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc index eb62744950..c7b0ce78e4 100644 --- a/etc/inc/unbound.inc +++ b/etc/inc/unbound.inc @@ -427,6 +427,9 @@ function do_as_unbound_user($cmd) { case "stop": mwexec("echo '/usr/local/sbin/unbound-control stop' | /usr/bin/su -m unbound", true); break; + case "reload": + mwexec("echo '/usr/local/sbin/unbound-control reload' | /usr/bin/su -m unbound", true); + break; case "unbound-anchor": mwexec("echo '/usr/local/sbin/unbound-anchor -a {$g['unbound_chroot_path']}/root.key' | /usr/bin/su -m unbound", true); break; From 0a5a8df9ebc75de4de229b9a8d23496c9c2877b5 Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Fri, 21 Nov 2014 21:10:07 +0200 Subject: [PATCH 2/2] d DHCPLeases starting before Unbound/DNSMasq and returning a pid not found message. Add missing reload feature --- etc/inc/services.inc | 4 ++++ etc/inc/system.inc | 2 -- etc/inc/unbound.inc | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/etc/inc/services.inc b/etc/inc/services.inc index a7fdeb44b5..b8a99ae13d 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -1864,6 +1864,8 @@ function services_dnsmasq_configure() { mwexec_bg($cmd); unset($args); + system_dhcpleases_configure(); + if ($g['booting']) echo gettext("done.") . "\n"; } @@ -1903,6 +1905,8 @@ function services_unbound_configure() { sync_unbound_service(); if ($g['booting']) echo gettext("done.") . "\n"; + + system_dhcpleases_configure(); } if (!$g['booting']) { diff --git a/etc/inc/system.inc b/etc/inc/system.inc index babfb46a7c..fd927bdb6c 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -381,8 +381,6 @@ function system_hosts_generate() { unbound_hosts_generate(); } - system_dhcpleases_configure(); - return 0; } diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc index eb62744950..c7b0ce78e4 100644 --- a/etc/inc/unbound.inc +++ b/etc/inc/unbound.inc @@ -427,6 +427,9 @@ function do_as_unbound_user($cmd) { case "stop": mwexec("echo '/usr/local/sbin/unbound-control stop' | /usr/bin/su -m unbound", true); break; + case "reload": + mwexec("echo '/usr/local/sbin/unbound-control reload' | /usr/bin/su -m unbound", true); + break; case "unbound-anchor": mwexec("echo '/usr/local/sbin/unbound-anchor -a {$g['unbound_chroot_path']}/root.key' | /usr/bin/su -m unbound", true); break;