diff options
author | Stuart Wyatt <stuart@gogglespisano.com> | 2015-04-09 11:23:45 -0700 |
---|---|---|
committer | Stuart Wyatt <stuart@gogglespisano.com> | 2015-04-09 11:23:45 -0700 |
commit | 5bc2fc912d21ee5b0ccb4c16f391b9465949e6ed (patch) | |
tree | b624720a1040c50132494ed34b6a7cb0e2141896 | |
parent | 83bbbdc238bd2c72328115bccd5455c67c4bd376 (diff) | |
download | pfsense-packages-5bc2fc912d21ee5b0ccb4c16f391b9465949e6ed.tar.gz pfsense-packages-5bc2fc912d21ee5b0ccb4c16f391b9465949e6ed.tar.bz2 pfsense-packages-5bc2fc912d21ee5b0ccb4c16f391b9465949e6ed.zip |
BIND - improve indentation in generated named.conf file
This improves the readability of the generated named.conf file.
-rw-r--r-- | config/bind/bind.inc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/config/bind/bind.inc b/config/bind/bind.inc index d5af73b6..94634b44 100644 --- a/config/bind/bind.inc +++ b/config/bind/bind.inc @@ -210,23 +210,23 @@ EOD; $bind_listenon = ($bind_listenon == "" ? "none;" : $bind_listenon); // print "<PRE>$bind_listenonv6 $bind_listenon"; if (array_key_exists("ipv6allow", $config['system'])) { - $bind_conf .= "\t\tlisten-on-v6 { $bind_listenonv6 };\n"; + $bind_conf .= "\tlisten-on-v6 { $bind_listenonv6 };\n"; } $bind_conf .= "\tlisten-on { $bind_listenon };\n"; // forwarder config if ($bind_forwarder == 'on') { - $bind_conf .= "\t\tforwarders { $forwarder_ips };\n"; + $bind_conf .= "\tforwarders { $forwarder_ips };\n"; } if ($bind_notify == 'on') { - $bind_conf .= "\t\tnotify yes;\n"; + $bind_conf .= "\tnotify yes;\n"; } if ($hide_version == 'on') { - $bind_conf .= "\t\tversion none;\n"; + $bind_conf .= "\tversion none;\n"; } $bind_conf .= preg_replace("/^/m", "\t", $custom_options); - $bind_conf .= "\n\t};\n\n"; + $bind_conf .= "\n};\n\n"; if ($bind_logging == 'on') { //check if bind is included on syslog @@ -260,13 +260,14 @@ logging { EOD; foreach ($log_categories as $category) { - $bind_conf .= "\t\t\tcategory $category\t{custom;};\n"; + $bind_conf .= "\tcategory $category { custom; };\n"; } - $bind_conf .= "\t\t};\n\n"; + $bind_conf .= "};"; } } else { - $bind_conf .= "\t\tlogging { category default { null; }; };\n\n"; + $bind_conf .= "logging { category default { null; }; };"; } + $bind_conf .= "\n\n"; // Config Zone domain @@ -319,13 +320,14 @@ EOD; } $viewcustomoptions = base64_decode($views['bind_custom_options']); - $bind_conf .= "view \"$viewname\" { \n\n"; + $bind_conf .= "view \"$viewname\" { \n"; $bind_conf .= "\trecursion $viewrecursion;\n"; $bind_conf .= "\tmatch-clients { $viewmatchclients; };\n"; $bind_conf .= "\tallow-recursion { $viewallowrecursion; };\n"; if (!empty($viewcustomoptions)) { - $bind_conf .= "\t$viewcustomoptions\n\n"; + $bind_conf .= preg_replace("/^/m", "\t", $viewcustomoptions)."\n"; } + $bind_conf .= "\n"; if (is_array($config['installedpackages']['bindzone'])) { $bindzone = $config['installedpackages']['bindzone']['config']; |