Revert "fix: persist default drive/device" (#8440)

This reverts commit 30ccab4 which introduced the issue 8436.
This commit is contained in:
Megan Marsh 2019-12-03 04:42:11 -08:00 committed by Sylvia Moss
parent fcda07ee6a
commit 7d8f1c01c4
1 changed files with 7 additions and 4 deletions

View File

@ -266,10 +266,13 @@ func getCommandArgs(bootDrive string, state multistep.StateBag) ([]string, error
arg = defaultArgs[key].([]string)
}
inArgs[key] = arg
} else {
if key == "-device" || key == "-drive" {
inArgs[key] = append(defaultArgs[key].([]string), inArgs[key]...)
}
}
}
// Check if we are missing the netDevice #6804
if x, ok := inArgs["-device"]; ok {
if !strings.Contains(strings.Join(x, ""), config.NetDevice) {
inArgs["-device"] = append(inArgs["-device"], fmt.Sprintf("%s,netdev=user.0", config.NetDevice))
}
}