Browse Source

Merge pull request #329 from philips/remove-redundant-datadir-code

fix(etcd): remove duplicate DataDir setup
Brandon Philips 12 years ago
parent
commit
c93f086032
1 changed files with 0 additions and 11 deletions
  1. 0 11
      etcd.go

+ 0 - 11
etcd.go

@@ -52,17 +52,6 @@ func main() {
 		profile(config.CPUProfileFile)
 		profile(config.CPUProfileFile)
 	}
 	}
 
 
-	// Setup a default directory based on the machine name
-	if config.DataDir == "" {
-		config.DataDir = config.Name + ".etcd"
-		log.Warnf("Using the directory %s as the etcd configuration directory because a directory was not specified. ", config.DataDir)
-	}
-
-	// Create data directory if it doesn't already exist.
-	if err := os.MkdirAll(config.DataDir, 0744); err != nil {
-		log.Fatalf("Unable to create path: %s", err)
-	}
-
 	// Load info object.
 	// Load info object.
 	info, err := config.Info()
 	info, err := config.Info()
 	if err != nil {
 	if err != nil {