diff options
author | Renato Botelho <renato@netgate.com> | 2017-08-16 15:38:04 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-08-16 15:38:04 -0300 |
commit | 2f3ea7ab9d71a8a223e962badd21aee90dfaa1ba (patch) | |
tree | 9cb5c7b8cd7865214073ab38ea2200dc713f3a93 /src/etc/inc | |
parent | 1efb03647d101cffd2efe65a4e3cfe21809aa5dd (diff) | |
parent | 881fb1867e81cc396277a73e4241f7a47a86a446 (diff) | |
download | pfsense-2f3ea7ab9d71a8a223e962badd21aee90dfaa1ba.zip pfsense-2f3ea7ab9d71a8a223e962badd21aee90dfaa1ba.tar.gz |
Merge pull request #3799 from marjohn56/Unbound-start-delay
Diffstat (limited to 'src/etc/inc')
-rw-r--r-- | src/etc/inc/interfaces.inc | 3 | ||||
-rw-r--r-- | src/etc/inc/services.inc | 18 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 1a498f7..e711f91 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -3515,6 +3515,9 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven // N.B. PPP connections using PPP as the IPv6 parent interface are excluded because the ppp-ipv6 script // calls interface_dhcpv6_configure() for these connections after IPv6CP is up, whilst rc.newwanip // handles all non-PPP connections with 'dhcp6usev4iface' set + /* Remove the check file. Should not be there but just in case */ + unlink_if_exists("/tmp/{$wanif}_dhcp6_complete"); + log_error(gettext("calling interface_dhcpv6_configure.")); if (!(isset($wancfg['dhcp6usev4iface']) || $wancfg['ipaddr']==='ppp')) { interface_dhcpv6_configure($interface, $wancfg); } diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc index b17b088..41ec68c 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -2261,8 +2261,26 @@ function services_unbound_configure($restart_dhcp = true) { $return = 1; } + /* Check here for dhcp6 complete - wait upto 10 seconds */ + if($config['interfaces']["wan"]['ipaddrv6'] == 'dhcp6') { + $wanif = get_real_interface("wan", "inet6"); + if (platform_booting()) { + for ($i=1; $i <= 10; $i++) { + if (!file_exists("/tmp/{$wanif}_dhcp6_complete")) { + log_error(gettext("Unbound start waiting on dhcp6c.")); + sleep(1); + } else { + unlink_if_exists("/tmp/{$wanif}_dhcp6_complete"); + log_error(gettext("dhcp6 init complete. Continuing")); + break; + } + } + } + } + sync_unbound_service(); if (platform_booting()) { + log_error(gettext("sync unbound done.")); echo gettext("done.") . "\n"; } |