diff options
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc')
-rw-r--r-- | meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc b/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc index 94d9553e11..7968a44382 100644 --- a/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc +++ b/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc @@ -11,7 +11,7 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=e870c934e2c3d6ccf085fd7cf0a1e2e2" -SRC_URI = "git://gitosis.stanford.edu/openflow.git;protocol=git" +SRC_URI = "git://gitosis.stanford.edu/openflow.git;protocol=git;branch=master" DEPENDS = "virtual/libc" @@ -34,4 +34,22 @@ do_configure:prepend() { do_install:append() { # Remove /var/run as it is created on startup 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" |