The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/3372
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Closes #3367 Signed-off-by: Stéphane Graber <[email protected]>
From d746deddb52a5419bf03b283878f94cbeec4cc08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <[email protected]> Date: Wed, 31 May 2017 12:18:01 -0400 Subject: [PATCH] network: Always pass --conf-file to dnsmasq MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #3367 Signed-off-by: Stéphane Graber <[email protected]> --- lxd/networks.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lxd/networks.go b/lxd/networks.go index f5582127b..7a8be9c9f 100644 --- a/lxd/networks.go +++ b/lxd/networks.go @@ -1156,14 +1156,12 @@ func (n *network) Start() error { dnsmasqCmd = append(dnsmasqCmd, []string{"-s", dnsDomain, "-S", fmt.Sprintf("/%s/", dnsDomain)}...) } - // Create raw config file - if n.config["raw.dnsmasq"] != "" { - err = ioutil.WriteFile(shared.VarPath("networks", n.name, "dnsmasq.raw"), []byte(fmt.Sprintf("%s\n", n.config["raw.dnsmasq"])), 0) - if err != nil { - return err - } - dnsmasqCmd = append(dnsmasqCmd, fmt.Sprintf("--conf-file=%s", shared.VarPath("networks", n.name, "dnsmasq.raw"))) + // Create a config file to contain additional config (and to prevent dnsmasq from reading /etc/dnsmasq.conf) + err = ioutil.WriteFile(shared.VarPath("networks", n.name, "dnsmasq.raw"), []byte(fmt.Sprintf("%s\n", n.config["raw.dnsmasq"])), 0) + if err != nil { + return err } + dnsmasqCmd = append(dnsmasqCmd, fmt.Sprintf("--conf-file=%s", shared.VarPath("networks", n.name, "dnsmasq.raw"))) // Create DHCP hosts file if !shared.PathExists(shared.VarPath("networks", n.name, "dnsmasq.hosts")) {
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
