Commit f7a102ff authored by anarcat's avatar anarcat Committed by anarcat

try to naively implement a slave dns class, which is a failure so far

parent 53abc86b
...@@ -30,8 +30,32 @@ class provisionService_dns_bind extends provisionService_dns { ...@@ -30,8 +30,32 @@ class provisionService_dns_bind extends provisionService_dns {
} }
} }
class provisionService_dns_bind_slave extends provisionService_dns {
protected $application_name = 'bind';
protected $has_restart_cmd = TRUE;
function default_restart_cmd() {
return provisionService_dns_bind::bind_default_restart_cmd();
}
function init_server() {
parent::init_server();
$this->server->setProperty('dns_master_server', null);
$this->configs['slave'][] = 'provisionConfig_bind_slave';
}
function parse_configs() {
$this->restart();
}
}
class provisionConfig_bind_zone extends provisionConfig_dns_zone { class provisionConfig_bind_zone extends provisionConfig_dns_zone {
} }
class provisionConfig_bind_server extends provisionConfig_dns_server { class provisionConfig_bind_server extends provisionConfig_dns_server {
} }
class provisionConfig_bind_slave extends provisionConfig_dns_server {
}
<?php
foreach ($records as $key => $name) {
printf('zone "%s" { type slave; file "%s/%s.zone"; masters { %s; }; allow-query { any; }; };' . "\n", $name, $dns_zoned_path, $name, $master_server);
}
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment