pfsense/pfsense — pull request #1350 by phil-davis (2014-11-27 10:27:15+00:00)
Title: Fix Unbound host_entries.conf warnings on console during boot

system_hosts_generate() tried to make /var/unbound/host_entries.conf at various times in the boot sequence before the main Unbound start code was called. But these early calls to unbound-related things did not have any check to see if /var/unbound was created yet.
I pulled out the code to create /var/unbound into a separate routine, create_unbound_chroot_path, then call that before any of the file_put_contents.
That gets rid of the console error messages during boot, and also will correct any future issue with the sequence of calls to any of these routines.