[yocto] [meta-cgl][PATCH 03/10] pacemaker: provide tmpfiles configuration
Dmitry Eremin-Solenikov
dmitry_eremin at mentor.com
Fri May 8 13:13:23 PDT 2015
provide systemd-tmpfiles configuration for distributions using systemd.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin at mentor.com>
---
meta-cgl-common/recipes-cgl/pacemaker/files/tmpfiles | 5 +++++
meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb | 11 ++++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 meta-cgl-common/recipes-cgl/pacemaker/files/tmpfiles
diff --git a/meta-cgl-common/recipes-cgl/pacemaker/files/tmpfiles b/meta-cgl-common/recipes-cgl/pacemaker/files/tmpfiles
new file mode 100644
index 0000000..1d2b295
--- /dev/null
+++ b/meta-cgl-common/recipes-cgl/pacemaker/files/tmpfiles
@@ -0,0 +1,5 @@
+d /var/lib/heartbeat/crm 0750 hacluster haclient -
+d /var/lib/pengine 0755 hacluster haclient -
+d /var/run/heartbeat 0755 hacluster haclient -
+d /var/run/heartbeat/rsctmp 0755 hacluster haclient -
+d /var/run/crm 0755 hacluster haclient -
diff --git a/meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb b/meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb
index 8bef6f4..a5cd284 100644
--- a/meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb
+++ b/meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb
@@ -28,6 +28,7 @@ SRC_URI = " \
file://pacemaker-fix-xml-config.patch \
file://pacemaker-no-bash.patch \
file://volatiles \
+ file://tmpfiles \
"
SRC_URI_append_libc-uclibc = " file://kill-stack-protector.patch"
SRC_URI[md5sum] = "103fb2e804be3f8ace17021c5d9ad15d"
@@ -47,13 +48,21 @@ GROUPADD_PARAM_${PN} = "-r haclient"
do_install_append() {
install -d ${D}${sysconfdir}/default/volatiles
install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/06_pacemaker
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ install -m 0644 ${WORKDIR}/tmpfiles ${D}${sysconfdir}/tmpfiles.d/${PN}.conf
find ${D} -name "*.pyo" -exec rm {} \;
find ${D} -name "*.pyc" -exec rm {} \;
find ${D} -name "*.py" | xargs sed -i -e "s:${STAGING_BINDIR_NATIVE}:${bindir}:g"
}
pkg_postinst_${PN} () {
- /etc/init.d/populate-volatile.sh update
+ if [ -z "$D" ]; then
+ if type systemd-tmpfiles >/dev/null; then
+ systemd-tmpfiles --create
+ elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+ ${sysconfdir}/init.d/populate-volatile.sh update
+ fi
+ fi
}
FILES_${PN}-doc += "${datadir}/pacemaker/crm_cli.txt ${datadir}/pacemaker/templates/"
FILES_${PN} += " \
--
2.1.4
More information about the yocto
mailing list