Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
dd2a605d
Commit
dd2a605d
authored
Mar 13, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unbound: simplify for #1449
parent
137dda20
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
30 deletions
+2
-30
dnsmasq.inc
src/etc/inc/plugins.inc.d/dnsmasq.inc
+0
-6
unbound.inc
src/etc/inc/plugins.inc.d/unbound.inc
+2
-24
No files found.
src/etc/inc/plugins.inc.d/dnsmasq.inc
View file @
dd2a605d
...
@@ -68,12 +68,6 @@ function dnsmasq_xmlrpc_sync()
...
@@ -68,12 +68,6 @@ function dnsmasq_xmlrpc_sync()
return
$result
;
return
$result
;
}
}
function
dnsmasq_configure
()
{
/* XXX stub that prevents dnsmasq from starting again on bootup */
return
array
();
}
function
dnsmasq_configure_do
(
$verbose
=
false
)
function
dnsmasq_configure_do
(
$verbose
=
false
)
{
{
global
$config
;
global
$config
;
...
...
src/etc/inc/plugins.inc.d/unbound.inc
View file @
dd2a605d
...
@@ -68,12 +68,6 @@ function unbound_xmlrpc_sync()
...
@@ -68,12 +68,6 @@ function unbound_xmlrpc_sync()
return
$result
;
return
$result
;
}
}
function
unbound_configure
()
{
/* XXX stub that prevents unbound from starting again on bootup */
return
array
();
}
function
unbound_optimization
()
function
unbound_optimization
()
{
{
global
$config
;
global
$config
;
...
@@ -138,24 +132,10 @@ function unbound_optimization()
...
@@ -138,24 +132,10 @@ function unbound_optimization()
return
$optimization
;
return
$optimization
;
}
}
function
unbound_bootstrap_root
()
{
global
$g
;
if
(
!
is_dir
(
$g
[
'unbound_chroot_path'
]))
{
mkdir
(
$g
[
'unbound_chroot_path'
]);
chown
(
$g
[
'unbound_chroot_path'
],
'unbound'
);
chgrp
(
$g
[
'unbound_chroot_path'
],
'unbound'
);
}
}
function
unbound_generate_config
()
function
unbound_generate_config
()
{
{
global
$config
,
$g
;
global
$config
,
$g
;
// Bootstrap needed for /var MFS
unbound_bootstrap_root
();
// Setup optimization
// Setup optimization
$optimization
=
unbound_optimization
();
$optimization
=
unbound_optimization
();
...
@@ -448,7 +428,6 @@ function unbound_configure_do($verbose = false)
...
@@ -448,7 +428,6 @@ function unbound_configure_do($verbose = false)
flush
();
flush
();
}
}
unbound_bootstrap_root
();
unbound_execute
(
'unbound-anchor'
);
unbound_execute
(
'unbound-anchor'
);
unbound_remote_control_setup
();
unbound_remote_control_setup
();
unbound_generate_config
();
unbound_generate_config
();
...
@@ -485,7 +464,8 @@ function unbound_execute($cmd)
...
@@ -485,7 +464,8 @@ function unbound_execute($cmd)
case
'unbound-anchor'
:
case
'unbound-anchor'
:
mwexecf
(
mwexecf
(
'chroot -u unbound -g unbound / %s -a %s'
,
'chroot -u unbound -g unbound / %s -a %s'
,
array
(
'/usr/local/sbin/unbound-anchor'
,
"
{
$g
[
'unbound_chroot_path'
]
}
/root.key"
)
array
(
'/usr/local/sbin/unbound-anchor'
,
"
{
$g
[
'unbound_chroot_path'
]
}
/root.key"
),
true
);
);
break
;
break
;
case
'unbound-control-setup'
:
case
'unbound-control-setup'
:
...
@@ -671,7 +651,6 @@ function unbound_add_host_entries()
...
@@ -671,7 +651,6 @@ function unbound_add_host_entries()
}
}
}
}
unbound_bootstrap_root
();
file_put_contents
(
"
{
$g
[
'unbound_chroot_path'
]
}
/host_entries.conf"
,
$unbound_entries
);
file_put_contents
(
"
{
$g
[
'unbound_chroot_path'
]
}
/host_entries.conf"
,
$unbound_entries
);
}
}
...
@@ -752,7 +731,6 @@ function unbound_acls_config() {
...
@@ -752,7 +731,6 @@ function unbound_acls_config() {
}
}
// Write out Access list
// Write out Access list
unbound_bootstrap_root
();
file_put_contents
(
"
{
$g
[
'unbound_chroot_path'
]
}
/access_lists.conf"
,
$aclcfg
);
file_put_contents
(
"
{
$g
[
'unbound_chroot_path'
]
}
/access_lists.conf"
,
$aclcfg
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment