mirror of
https://gitea.elkins.co/Networking/ccl.git
synced 2025-03-09 12:41:40 -05:00
I broke the no-network edge case
This commit is contained in:
parent
cffc259aeb
commit
c2e55fb287
@ -197,13 +197,19 @@ func (c *Container) doDnsForward(rr []string) error {
|
||||
}
|
||||
|
||||
func (c *Container) NsUpdateCommands() cmd.Set {
|
||||
if len(c.Networks) == 0 {
|
||||
return c.newCommandSet("NSUPDATE", []cmd.Command{
|
||||
cmd.NewNop(),
|
||||
})
|
||||
}
|
||||
|
||||
// check that a server is configured
|
||||
if c.DomainName == "" || c.DnsServer == "" {
|
||||
return cmd.Set{ID: "NSUPDATE", Commands: []cmd.Command{
|
||||
return c.newCommandSet("NSUPDATE", []cmd.Command{
|
||||
cmd.NewFunc("NSUPDATE_NOT_CONFIGURED", func() error {
|
||||
return fmt.Errorf("nsupdate command requires `domain_name` and `dns_server` to be configured")
|
||||
}),
|
||||
}}
|
||||
})
|
||||
}
|
||||
|
||||
// determine hostname
|
||||
|
Loading…
x
Reference in New Issue
Block a user