Browse Source

Fix issue within mergeConfig preventing hostname and user to be set

Guillaume J. Charmes 12 years ago
parent
commit
8378498951
1 changed files with 2 additions and 2 deletions
  1. 2 2
      runtime.go

+ 2 - 2
runtime.go

@@ -80,10 +80,10 @@ func (runtime *Runtime) containerRoot(id string) string {
 }
 }
 
 
 func (runtime *Runtime) mergeConfig(userConf, imageConf *Config) {
 func (runtime *Runtime) mergeConfig(userConf, imageConf *Config) {
-	if userConf.Hostname != "" {
+	if userConf.Hostname == "" {
 		userConf.Hostname = imageConf.Hostname
 		userConf.Hostname = imageConf.Hostname
 	}
 	}
-	if userConf.User != "" {
+	if userConf.User == "" {
 		userConf.User = imageConf.User
 		userConf.User = imageConf.User
 	}
 	}
 	if userConf.Memory == 0 {
 	if userConf.Memory == 0 {