diff --git a/data/data/bootstrap/files/etc/coredns/Corefile b/data/data/bootstrap/baremetal/files/etc/coredns/Corefile similarity index 100% rename from data/data/bootstrap/files/etc/coredns/Corefile rename to data/data/bootstrap/baremetal/files/etc/coredns/Corefile diff --git a/data/data/bootstrap/files/etc/dhcp/dhclient.conf b/data/data/bootstrap/baremetal/files/etc/dhcp/dhclient.conf similarity index 100% rename from data/data/bootstrap/files/etc/dhcp/dhclient.conf rename to data/data/bootstrap/baremetal/files/etc/dhcp/dhclient.conf diff --git a/data/data/bootstrap/files/etc/keepalived/keepalived.conf.tmpl b/data/data/bootstrap/baremetal/files/etc/keepalived/keepalived.conf.tmpl similarity index 100% rename from data/data/bootstrap/files/etc/keepalived/keepalived.conf.tmpl rename to data/data/bootstrap/baremetal/files/etc/keepalived/keepalived.conf.tmpl diff --git a/data/data/bootstrap/files/usr/local/bin/coredns.sh b/data/data/bootstrap/baremetal/files/usr/local/bin/coredns.sh similarity index 100% rename from data/data/bootstrap/files/usr/local/bin/coredns.sh rename to data/data/bootstrap/baremetal/files/usr/local/bin/coredns.sh diff --git a/data/data/bootstrap/files/usr/local/bin/keepalived.sh b/data/data/bootstrap/baremetal/files/usr/local/bin/keepalived.sh similarity index 100% rename from data/data/bootstrap/files/usr/local/bin/keepalived.sh rename to data/data/bootstrap/baremetal/files/usr/local/bin/keepalived.sh diff --git a/data/data/bootstrap/systemd/units/coredns.service b/data/data/bootstrap/baremetal/systemd/units/coredns.service similarity index 100% rename from data/data/bootstrap/systemd/units/coredns.service rename to data/data/bootstrap/baremetal/systemd/units/coredns.service diff --git a/data/data/bootstrap/systemd/units/keepalived.service b/data/data/bootstrap/baremetal/systemd/units/keepalived.service similarity index 100% rename from data/data/bootstrap/systemd/units/keepalived.service rename to data/data/bootstrap/baremetal/systemd/units/keepalived.service diff --git a/pkg/asset/ignition/bootstrap/bootstrap.go b/pkg/asset/ignition/bootstrap/bootstrap.go index 8a42fcfe9..20f609676 100644 --- a/pkg/asset/ignition/bootstrap/bootstrap.go +++ b/pkg/asset/ignition/bootstrap/bootstrap.go @@ -127,6 +127,24 @@ func (a *Bootstrap) Generate(dependencies asset.Parents) error { if err != nil { return err } + + // Check for optional platform specific directories + platform := installConfig.Config.Platform.Name() + platformFilePath := fmt.Sprintf("bootstrap/%s/files", platform) + if _, err := os.Stat(platformFilePath); !os.IsNotExist(err) { + err = a.addStorageFiles("/", platformFilePath, templateData) + if err != nil { + return err + } + } + platformUnitPath := fmt.Sprintf("bootstrap/%s/units", platform) + if _, err := os.Stat(platformUnitPath); !os.IsNotExist(err) { + err = a.addSystemdUnits(platformUnitPath, templateData) + if err != nil { + return err + } + } + a.addParentFiles(dependencies) a.Config.Passwd.Users = append(