diff options
-rw-r--r-- | config/bind/bind.inc | 13 | ||||
-rw-r--r-- | config/bind/bind.xml | 12 |
2 files changed, 20 insertions, 5 deletions
diff --git a/config/bind/bind.inc b/config/bind/bind.inc index 747fdc27..ba8c5dfe 100644 --- a/config/bind/bind.inc +++ b/config/bind/bind.inc @@ -799,12 +799,15 @@ function bind_print_javascript_type_zone2() function bind_write_rcfile() { + global $config; + $bind = $config['installedpackages']['bind']['config'][0]; + $ip_version = ($bind['bind_ip_version'] ? $bind['bind_ip_version'] : ""); $rc = array(); $BIND_LOCALBASE = "/usr/local"; $rc['file'] = 'named.sh'; $rc['start'] = <<<EOD - if [ -z "`ps auxw | grep "[n]amed -c /etc/namedb/named.conf"|awk '{print $2}'`" ];then - {$BIND_LOCALBASE}/sbin/named -c /etc/namedb/named.conf -u bind -t /cf/named/ + if [ -z "`ps auxw | grep "[n]amed {$ip_version} -c /etc/namedb/named.conf"|awk '{print $2}'`" ];then + {$BIND_LOCALBASE}/sbin/named {$ip_version} -c /etc/namedb/named.conf -u bind -t /cf/named/ fi EOD; $rc['stop'] = <<<EOD @@ -812,12 +815,12 @@ EOD; sleep 2 EOD; $rc['restart'] = <<<EOD - if [ -z "`ps auxw | grep "[n]amed -c /etc/namedb/named.conf"|awk '{print $2}'`" ];then - {$BIND_LOCALBASE}/sbin/named -c /etc/namedb/named.conf -u bind -t /cf/named/ + if [ -z "`ps auxw | grep "[n]amed {$ip_version} -c /etc/namedb/named.conf"|awk '{print $2}'`" ];then + {$BIND_LOCALBASE}/sbin/named {$ip_version} -c /etc/namedb/named.conf -u bind -t /cf/named/ else killall -9 named 2>/dev/null sleep 3 - {$BIND_LOCALBASE}/sbin/named -c /etc/namedb/named.conf -u bind -t /cf/named/ + {$BIND_LOCALBASE}/sbin/named {$ip_version} -c /etc/namedb/named.conf -u bind -t /cf/named/ fi EOD; conf_mount_rw(); diff --git a/config/bind/bind.xml b/config/bind/bind.xml index 3b5d9ad2..c24bf351 100644 --- a/config/bind/bind.xml +++ b/config/bind/bind.xml @@ -143,6 +143,18 @@ <required/> </field> <field> + <fielddescr>IP Version</fielddescr> + <fieldname>bind_ip_version</fieldname> + <description><![CDATA[Select IP transport version.<br> + This controls which transports are used when resolving queries.]]></description> + <type>select</type> + <options> + <option><name>IPv4+IPv6</name><value></value></option> + <option><name>IPv4</name><value>-4</value></option> + <option><name>IPv6</name><value>-6</value></option> + </options> + </field> + <field> <fielddescr>Listen on</fielddescr> <fieldname>listenon</fieldname> <description><![CDATA[Choose the interfaces on which to enable BIND.]]></description> |