mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
dns/rfc2136: port to plugins_argument_map()
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
PLUGIN_NAME= rfc2136
|
||||
PLUGIN_VERSION= 1.9
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_REVISION= 2
|
||||
PLUGIN_COMMENT= RFC-2136 Support
|
||||
PLUGIN_MAINTAINER= franco@opnsense.org
|
||||
PLUGIN_DEPENDS= bind-tools
|
||||
|
||||
@@ -91,19 +91,16 @@ function rfc2136_configure_do($verbose = false, $int = null, $updatehost = '', $
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (!rfc2136_enabled()) {
|
||||
if (!rfc2136_enabled() || !plugins_argument_map($int)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* $int is passed as an optional CSV so transform into empty array when not set */
|
||||
$int = !empty($int) ? explode(',', $int) : [];
|
||||
|
||||
service_log('Configuring RFC 2136 clients...', $verbose);
|
||||
|
||||
foreach ($config['dnsupdates']['dnsupdate'] as $i => $dnsupdate) {
|
||||
if (!isset($dnsupdate['enable'])) {
|
||||
continue;
|
||||
} elseif (count($int) && !in_array($dnsupdate['interface'], $int)) {
|
||||
} elseif (!empty($int) && !in_array($dnsupdate['interface'], $int)) {
|
||||
continue;
|
||||
} elseif (!empty($updatehost) && ($updatehost != $dnsupdate['host'])) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user