summaryrefslogtreecommitdiffstats
path: root/etc/inc/unbound.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-06-19 15:58:06 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-06-19 15:58:06 -0300
commit3f0c20c3cd022925063d4c9b8d24a1f91fd8ca07 (patch)
tree7b76ae99f99a7840eed1642e825fe79fca1fbd85 /etc/inc/unbound.inc
parentc69d32f65d17ad7511afffa4fc581d7ebac87f80 (diff)
downloadpfsense-3f0c20c3cd022925063d4c9b8d24a1f91fd8ca07.zip
pfsense-3f0c20c3cd022925063d4c9b8d24a1f91fd8ca07.tar.gz
Add -n for 2 remaining sysctl calls, also replace backtick by exec
Diffstat (limited to 'etc/inc/unbound.inc')
-rw-r--r--etc/inc/unbound.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc
index aeaf0fc..b5de82f 100644
--- a/etc/inc/unbound.inc
+++ b/etc/inc/unbound.inc
@@ -45,7 +45,7 @@ function unbound_optimization() {
* Set the number of threads equal to number of CPUs.
* Use 1 to disable threading, if for some reason this sysctl fails.
*/
- $numprocs = intval(trim(`/sbin/sysctl kern.smp.cpus | /usr/bin/cut -d" " -f2`));
+ $numprocs = intval(trim(exec('/sbin/sysctl -n kern.smp.cpus')));
if ($numprocs > 0)
$optimization['number_threads'] = "num-threads: {$numprocs}";
else
@@ -670,4 +670,4 @@ function unbound_hosts_generate() {
unbound_control("reload");
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud