manifest: don't add hostname stage if not specified
Skip the hostname stage if the hostname option is an empty string.
This commit is contained in:
parent
0c6bbc6dff
commit
89202bdda8
1 changed files with 3 additions and 1 deletions
|
|
@ -254,7 +254,9 @@ func (p *OS) serialize() osbuild.Pipeline {
|
|||
pipeline.AddStage(osbuild.NewKeymapStage(&osbuild.KeymapStageOptions{Keymap: *p.Keyboard}))
|
||||
}
|
||||
|
||||
pipeline.AddStage(osbuild.NewHostnameStage(&osbuild.HostnameStageOptions{Hostname: p.Hostname}))
|
||||
if p.Hostname != "" {
|
||||
pipeline.AddStage(osbuild.NewHostnameStage(&osbuild.HostnameStageOptions{Hostname: p.Hostname}))
|
||||
}
|
||||
pipeline.AddStage(osbuild.NewTimezoneStage(&osbuild.TimezoneStageOptions{Zone: p.Timezone}))
|
||||
|
||||
if len(p.NTPServers) > 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue