agent: Better warning for keyring with -encrypt option. Fixes #718.

This commit is contained in:
Ryan Uber 2015-02-19 18:51:32 -08:00
parent f08d305406
commit a9f23a9154
1 changed files with 2 additions and 2 deletions

View File

@ -162,12 +162,12 @@ func (c *Command) readConfig() *Config {
}
keyfileLAN := filepath.Join(config.DataDir, serfLANKeyring)
if _, err := os.Stat(keyfileLAN); err == nil {
c.Ui.Error("WARNING: LAN keyring exists but -encrypt given, ignoring")
c.Ui.Error("WARNING: LAN keyring exists but -encrypt given, using keyring")
}
if config.Server {
keyfileWAN := filepath.Join(config.DataDir, serfWANKeyring)
if _, err := os.Stat(keyfileWAN); err == nil {
c.Ui.Error("WARNING: WAN keyring exists but -encrypt given, ignoring")
c.Ui.Error("WARNING: WAN keyring exists but -encrypt given, using keyring")
}
}
}