aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/setup/file.go26
-rw-r--r--core/setup/secondary.go2
2 files changed, 17 insertions, 11 deletions
diff --git a/core/setup/file.go b/core/setup/file.go
index 189977317..1fe04c1ec 100644
--- a/core/setup/file.go
+++ b/core/setup/file.go
@@ -16,18 +16,17 @@ func File(c *Controller) (middleware.Middleware, error) {
return nil, err
}
- // Add startup functions to notify the master.
+ // Add startup functions to notify the master(s).
for _, n := range zones.Names {
- if len(zones.Z[n].TransferTo) > 0 {
- c.Startup = append(c.Startup, func() error {
- zones.Z[n].StartupOnce.Do(func() {
- if len(zones.Z[n].TransferTo) > 0 {
- zones.Z[n].Notify()
- }
- })
- return nil
+ c.Startup = append(c.Startup, func() error {
+ zones.Z[n].StartupOnce.Do(func() {
+ if len(zones.Z[n].TransferTo) > 0 {
+ zones.Z[n].Notify()
+ }
+ zones.Z[n].Reload(nil)
})
- }
+ return nil
+ })
}
return func(next middleware.Handler) middleware.Handler {
@@ -67,17 +66,24 @@ func fileParse(c *Controller) (file.Zones, error) {
names = append(names, origins[i])
}
+ noReload := false
for c.NextBlock() {
t, _, e := parseTransfer(c)
if e != nil {
return file.Zones{}, e
}
+ switch c.Val() {
+ case "no_reload":
+ noReload = true
+ }
// discard from, here, maybe check and show log when we do?
for _, origin := range origins {
if t != nil {
z[origin].TransferTo = append(z[origin].TransferTo, t...)
}
+ z[origin].NoReload = noReload
}
+
}
}
}
diff --git a/core/setup/secondary.go b/core/setup/secondary.go
index 5f1ad3a17..0abf82c04 100644
--- a/core/setup/secondary.go
+++ b/core/setup/secondary.go
@@ -47,7 +47,7 @@ func secondaryParse(c *Controller) (file.Zones, error) {
}
for i, _ := range origins {
origins[i] = middleware.Host(origins[i]).Normalize()
- z[origins[i]] = file.NewZone(origins[i])
+ z[origins[i]] = file.NewZone(origins[i], "stdin")
names = append(names, origins[i])
}