mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-09-16 16:11:50 +00:00
openflow: Create /var/log/openflow in runtime
/var/log is normally a link to /var/volatile/log and /var/volatile is a tmpfs mount. So anything created in /var/log will not be available when the tmpfs is mounted. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
5c1cea8f8e
commit
c386e5ab79
@ -34,4 +34,22 @@ do_configure:prepend() {
|
|||||||
do_install:append() {
|
do_install:append() {
|
||||||
# Remove /var/run as it is created on startup
|
# Remove /var/run as it is created on startup
|
||||||
rm -rf ${D}${localstatedir}/run
|
rm -rf ${D}${localstatedir}/run
|
||||||
|
|
||||||
|
# /var/log/openflow needs to be created in runtime. Use rmdir to catch if
|
||||||
|
# upstream stops creating /var/log/openflow, or adds something else in
|
||||||
|
# /var/log.
|
||||||
|
rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log
|
||||||
|
rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
|
||||||
|
|
||||||
|
# Create /var/log/openflow in runtime.
|
||||||
|
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
|
||||||
|
install -d ${D}${nonarch_libdir}/tmpfiles.d
|
||||||
|
echo "d ${localstatedir}/log/${BPN} - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
|
||||||
|
fi
|
||||||
|
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
|
||||||
|
install -d ${D}${sysconfdir}/default/volatiles
|
||||||
|
echo "d root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user