Skip to content
Snippets Groups Projects
Commit 06630aa4 authored by Jake Taylor's avatar Jake Taylor
Browse files

fix missing salt on restart

parent 9859a7d3
Branches
Tags
No related merge requests found
......@@ -239,12 +239,10 @@ func (p *Params) ConvertToDefinition() (*internal.Definition, error) {
// Check if the IDF exists
if p.Node.Paths.Idf != "" && utils.Exists(p.Node.Paths.Idf) {
// If the IDF exists, then get the ID and save it
_, newID, err2 := idf.UnloadIDF(p.Node.Paths.Idf)
if err2 != nil {
return nil, errors.Errorf("Could not unload IDF: %+v", err2)
def.Salt, def.ID, err = idf.UnloadIDF(p.Node.Paths.Idf)
if err != nil {
return nil, errors.Errorf("Could not unload IDF: %+v", err)
}
def.ID = newID
} else {
// If the IDF does not exist, then generate a new ID, save it to an IDF,
// and save the ID to the definition
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment