mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 00:46:58 +02:00
fix(dev-db/etcd): fixup tmp file handling
instead of having scripts creating and managing directories use tmpfiles.d do all of that. This will fix c10n not working on the AMI too.
This commit is contained in:
parent
5dac798a26
commit
06f12e7668
@ -34,9 +34,7 @@ src_install() {
|
||||
dobin ${FILESDIR}/etcd-bootstrap
|
||||
dobin ${FILESDIR}/etcd-pre-exec
|
||||
|
||||
keepdir /var/lib/${PN}
|
||||
fowners etcd:etcd /var/lib/${PN}
|
||||
|
||||
systemd_dounit "${FILESDIR}"/${PN}.service
|
||||
systemd_enable_service multi-user.target ${PN}.service
|
||||
systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
|
||||
}
|
||||
|
@ -33,9 +33,7 @@ src_install() {
|
||||
dobin ${FILESDIR}/etcd-bootstrap
|
||||
dobin ${FILESDIR}/etcd-pre-exec
|
||||
|
||||
keepdir /var/lib/${PN}
|
||||
fowners etcd:etcd /var/lib/${PN}
|
||||
|
||||
systemd_dounit "${FILESDIR}"/${PN}.service
|
||||
systemd_enable_service multi-user.target ${PN}.service
|
||||
systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
STATE=/var/lib/etcd
|
||||
mkdir -p $STATE
|
||||
|
||||
VIRT=$(coreos-detect-virt)
|
||||
STATE=/var/lib/etcd
|
||||
|
||||
if [ "${VIRT}" != "ec2" ]; then
|
||||
echo "Detected environment \"${VIRT}\", just starting solo master..."
|
||||
|
@ -9,6 +9,3 @@ if [ -d /media/state/etcd ]; then
|
||||
rm -R ${OLD_STATE}
|
||||
chown -R etcd:etcd ${STATE}
|
||||
fi
|
||||
|
||||
mkdir -p /var/run/etcd
|
||||
chown etcd:etcd /var/run/etcd
|
||||
|
2
sdk_container/src/third_party/coreos-overlay/dev-db/etcd/files/etcd.conf
vendored
Normal file
2
sdk_container/src/third_party/coreos-overlay/dev-db/etcd/files/etcd.conf
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
d /var/lib/etcd 0755 etcd etcd - -
|
||||
d /var/run/etcd 0755 etcd etcd - -
|
Loading…
Reference in New Issue
Block a user