fix: avoid double append of talos.platform
kernel argument
The example configuration generated by talosctl contains ```yaml extraKernelArgs: - talos.platform=metal ``` in the install section, which, if uncommented, causes the installer to append the `talos.platform` option twice. Thus, if the platform is set/changed here, it will not be respected. This change allows the existing value to be overridden. Signed-off-by: Dennis Marttinen <twelho@welho.tech> Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This commit is contained in:
parent
27dfe7c035
commit
c2a5126088
@ -54,7 +54,11 @@ func Install(p runtime.Platform, seq runtime.Sequence, opts *Options) (err error
|
||||
return err
|
||||
}
|
||||
|
||||
if err = cmdline.AppendAll(opts.ExtraKernelArgs, procfs.WithOverwriteArgs("console")); err != nil {
|
||||
if err = cmdline.AppendAll(
|
||||
opts.ExtraKernelArgs,
|
||||
procfs.WithOverwriteArgs("console"),
|
||||
procfs.WithOverwriteArgs(constants.KernelParamPlatform),
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user