mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 02:16:59 +02:00
feat(coreos-base/coreos-cloudinit): Create generic template.
Replace coreos-cloudinit-oem.service by a generic service template that can be used for any path. Add rule to load cloud-configs installed by the coreos-install utility.
This commit is contained in:
parent
66d877f32d
commit
1b8331db60
@ -36,8 +36,7 @@ src_compile() {
|
||||
|
||||
src_install() {
|
||||
dobin ${S}/bin/coreos-cloudinit
|
||||
systemd_dounit "${FILESDIR}"/coreos-cloudinit-oem.service
|
||||
systemd_dounit "${FILESDIR}"/coreos-cloudinit@.service
|
||||
systemd_dounit "${FILESDIR}"/cloud-config.target
|
||||
systemd_enable_service default.target coreos-cloudinit-oem.service
|
||||
systemd_enable_service default.target cloud-config.target
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
[Unit]
|
||||
Requires=coreos-cloudinit-oem.service
|
||||
After=coreos-cloudinit-oem.service
|
||||
# Load OEM and coreos-install cloud-configs by default
|
||||
Requires=coreos-cloudinit@usr-share-oem-cloud\x2dconfig.yml.service
|
||||
After=coreos-cloudinit@usr-share-oem-cloud\x2dconfig.yml.service
|
||||
Requires=coreos-cloudinit@var-lib-coreos\x2dinstall-user_data.service
|
||||
After=coreos-cloudinit@var-lib-coreos\x2dinstall-user_data.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -1,14 +0,0 @@
|
||||
[Unit]
|
||||
Description=coreos-cloudinit for /usr/share/oem/cloud-config.yml
|
||||
Requires=dbus.service
|
||||
After=dbus.service
|
||||
RequiresMountsFor=/usr/share/oem
|
||||
ConditionPathExists=/usr/share/oem/cloud-config.yml
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/coreos-cloudinit --from-file=/usr/share/oem/cloud-config.yml
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=cloudinit.target
|
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Load cloud-config from %f
|
||||
Requires=dbus.service
|
||||
After=dbus.service
|
||||
RequiresMountsFor=%f
|
||||
ConditionFileNotEmpty=%f
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/coreos-cloudinit --from-file=%f
|
||||
|
||||
[Install]
|
||||
WantedBy=cloud-config.target
|
Loading…
Reference in New Issue
Block a user