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:
Brandon Philips 2013-08-13 15:58:41 -07:00
parent 5dac798a26
commit 06f12e7668
6 changed files with 5 additions and 12 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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..."

View File

@ -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

View File

@ -0,0 +1,2 @@
d /var/lib/etcd 0755 etcd etcd - -
d /var/run/etcd 0755 etcd etcd - -