Commit 2aa3eae7 authored by Adrian Rossouw's avatar Adrian Rossouw

dnsmasq is kinda working again.

parent e7e5ec01
......@@ -136,7 +136,8 @@ class provisionService_dns_basic extends provisionService_dns {
function create_zone($zone) {
$this->config('server')->record_set($zone, $zone)->write();
$this->config('zone')->record_set('soa', array(
$this->config('zone', $zone)->
record_set('soa', array(
'name' => $this->server->remote_host,
))->write();
}
......
addn-hosts=<?php print "{$dns_hostd_path}/{$this->uri}.hosts"; ?>
addn-hosts=<?php print "{$dns_hostd_path}/{$name}.hosts"; ?>
......@@ -44,6 +44,10 @@ class provisionService extends provisionChainedState {
function config($config, $data = array()) {
$this->_config = null;
if (!is_array($data) && is_string($data)) {
$data = array('name' => $data);
}
if (!isset($this->config_cache[$this->context->name][$config])) {
foreach ((array) $this->configs[$config] as $class) {
......@@ -57,6 +61,21 @@ class provisionService extends provisionChainedState {
return $this;
}
function unlink() {
if (is_object($this->_config)) {
$this->_config->unlink();
}
return $this;
}
function write() {
if (is_object($this->_config)) {
$this->_config->write();
}
return $this;
}
function record_set($arg1, $arg2 = null) {
if (is_object($this->_config)) {
if (is_object($this->_config->store)) {
......
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