mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 10:27:00 +02:00
add cloud-config.target and make etcd hang off of that
This commit is contained in:
parent
de0def339f
commit
1f3d02db36
@ -36,5 +36,7 @@ src_compile() {
|
|||||||
src_install() {
|
src_install() {
|
||||||
dobin ${S}/bin/coreos-cloudinit
|
dobin ${S}/bin/coreos-cloudinit
|
||||||
systemd_dounit "${FILESDIR}"/coreos-cloudinit-oem.service
|
systemd_dounit "${FILESDIR}"/coreos-cloudinit-oem.service
|
||||||
|
systemd_dounit "${FILESDIR}"/cloud-config.target
|
||||||
systemd_enable_service default.target coreos-cloudinit-oem.service
|
systemd_enable_service default.target coreos-cloudinit-oem.service
|
||||||
|
systemd_enable_service default.target cloud-config.target
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
Requires=coreos-cloudinit-oem.service
|
||||||
|
After=coreos-cloudinit-oem.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -7,17 +7,12 @@ After=coreos-setup-environment.service
|
|||||||
RequiresMountsFor=/usr/share/oem
|
RequiresMountsFor=/usr/share/oem
|
||||||
ConditionPathExists=/usr/share/oem/cloud-config.yml
|
ConditionPathExists=/usr/share/oem/cloud-config.yml
|
||||||
|
|
||||||
# We use this to start etcd, since cloudinit will reconfigure etcd
|
|
||||||
#Wants=etcd.service
|
|
||||||
#After=etcd.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
EnvironmentFile=/etc/environment
|
EnvironmentFile=/etc/environment
|
||||||
# XXX: We could not figure out a better way. The above Wants/After does not do this.
|
|
||||||
ExecStartPre=/usr/bin/coreos-cloudinit --from-file=/usr/share/oem/cloud-config.yml
|
ExecStartPre=/usr/bin/coreos-cloudinit --from-file=/usr/share/oem/cloud-config.yml
|
||||||
ExecStart=/usr/bin/systemctl daemon-reload
|
ExecStart=/usr/bin/systemctl daemon-reload
|
||||||
ExecStartPost=/usr/bin/systemctl start etcd
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
WantedBy=cloudinit.target
|
||||||
|
@ -37,4 +37,5 @@ src_install() {
|
|||||||
|
|
||||||
systemd_dounit "${FILESDIR}"/${PN}.service
|
systemd_dounit "${FILESDIR}"/${PN}.service
|
||||||
systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
|
systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
|
||||||
|
systemd_enable_service multi-user.target ${PN}.service
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=etcd
|
Description=etcd
|
||||||
|
After=cloud-config.target
|
||||||
|
Wants=cloud-config.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=etcd
|
User=etcd
|
||||||
PermissionsStartOnly=true
|
PermissionsStartOnly=true
|
||||||
Environment=ETCD_DATA_DIR=/var/lib/etcd ETCD_NAME=default
|
Environment=ETCD_DATA_DIR=/var/lib/etcd ETCD_NAME=default
|
||||||
ExecStart=/usr/bin/etcd
|
ExecStart=/usr/bin/etcd
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Loading…
Reference in New Issue
Block a user