Improve prefix creation and feedback

This makes the default /var/lib/mgmt/ directory, but also allows you to
use a prefix in /tmp/ automatically if you can't write anywhere else.
This commit is contained in:
James Shubin
2016-08-09 16:22:37 -04:00
parent 79ba750dd5
commit 03c1df98f4
2 changed files with 23 additions and 0 deletions

View File

@@ -1539,6 +1539,8 @@ func (obj *EmbdEtcd) StartServer(newCluster bool, peerURLsMap etcdtypes.URLsMap)
err = os.MkdirAll(obj.dataDir, 0770)
if err != nil {
log.Printf("Etcd: StartServer: Couldn't mkdir: %s.", obj.dataDir)
log.Printf("Etcd: StartServer: Mkdir error: %s.", err)
obj.DestroyServer()
return err
}