Added Init to datastructure, fixups to container interface, and --setdefault to kernel and container build

This commit is contained in:
Gregory Kurtzer
2020-12-06 22:29:25 -08:00
parent 9de9778648
commit 5c995f9d0f
18 changed files with 104 additions and 12 deletions

View File

@@ -98,6 +98,17 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
os.Exit(1)
}
}
if SetInit != "" {
wwlog.Printf(wwlog.VERBOSE, "Profile: %s, Setting init command to: %s\n", p.Id, SetInit)
p.Init.Set(SetInit)
err := nodeDB.ProfileUpdate(p)
if err != nil {
wwlog.Printf(wwlog.ERROR, "%s\n", err)
os.Exit(1)
}
}
if SetKernel != "" {
wwlog.Printf(wwlog.VERBOSE, "Profile: %s, Setting Kernel version to: %s\n", p.Id, SetKernel)