diff options
| -rw-r--r-- | addDroplet.go | 2 | ||||
| -rw-r--r-- | main.go | 22 |
2 files changed, 14 insertions, 10 deletions
diff --git a/addDroplet.go b/addDroplet.go index ebdcaf1..f6baa8c 100644 --- a/addDroplet.go +++ b/addDroplet.go @@ -24,6 +24,8 @@ func addDomainDroplet(domcfg *libvirtxml.Domain) (*DropletT, error) { d = new(DropletT) d.pb = me.cluster.AddDroplet(domcfg.UUID, domcfg.Name, 2, 2*1024*1024) + d.pb.StartState = "off" + me.droplets = append(me.droplets, d) me.changed = true @@ -81,19 +81,21 @@ func main() { } } } - if me.changed { - if argv.Save { - writeConfigFile() - writeConfigFileDroplets() - } else { - log.Info("Not saving changes (use --save to save)") + if len(argv.Xml) != 0 { + if me.changed { + if argv.Save { + writeConfigFile() + writeConfigFileDroplets() + } else { + log.Info("Not saving changes (use --save to save)") + } + } + if !ok { + log.Info("adding xml files failed") + os.Exit(-1) } os.Exit(0) } - if !ok { - log.Info("adding xml files failed") - os.Exit(-1) - } /* log.Info("command line hypervisors:", argv.Hosts) |
