1
0
mirror of https://github.com/rancher/os.git synced 2025-09-25 12:47:20 +00:00

ovfenv: always fallback to reading variables from vm params

This commit is contained in:
Sergej Nikolaev
2018-09-26 12:27:44 +03:00
parent 693f9fc108
commit 7d66bd5c41

View File

@@ -33,7 +33,10 @@ type ovfWrapper struct {
} }
func (ovf ovfWrapper) readConfig(key string) (string, error) { func (ovf ovfWrapper) readConfig(key string) (string, error) {
return ovf.env.Properties["guestinfo."+key], nil if val := ovf.env.Properties["guestinfo."+key]; val != "" {
return val, nil
}
return readConfig(key)
} }
func NewDatasource(fileName string) *VMWare { func NewDatasource(fileName string) *VMWare {