diff options
| -rw-r--r-- | meta-networking/recipes-protocols/openflow/openflow.inc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/openflow/openflow.inc b/meta-networking/recipes-protocols/openflow/openflow.inc index 94d9553e11..c4e69b58e3 100644 --- a/meta-networking/recipes-protocols/openflow/openflow.inc +++ b/meta-networking/recipes-protocols/openflow/openflow.inc | |||
| @@ -34,4 +34,22 @@ do_configure:prepend() { | |||
| 34 | do_install:append() { | 34 | do_install:append() { |
| 35 | # Remove /var/run as it is created on startup | 35 | # Remove /var/run as it is created on startup |
| 36 | rm -rf ${D}${localstatedir}/run | 36 | rm -rf ${D}${localstatedir}/run |
| 37 | |||
| 38 | # /var/log/openflow needs to be created in runtime. Use rmdir to catch if | ||
| 39 | # upstream stops creating /var/log/openflow, or adds something else in | ||
| 40 | # /var/log. | ||
| 41 | rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log | ||
| 42 | rmdir --ignore-fail-on-non-empty ${D}${localstatedir} | ||
| 43 | |||
| 44 | # Create /var/log/openflow in runtime. | ||
| 45 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then | ||
| 46 | install -d ${D}${nonarch_libdir}/tmpfiles.d | ||
| 47 | echo "d ${localstatedir}/log/${BPN} - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf | ||
| 48 | fi | ||
| 49 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then | ||
| 50 | install -d ${D}${sysconfdir}/default/volatiles | ||
| 51 | echo "d root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} | ||
| 52 | fi | ||
| 37 | } | 53 | } |
| 54 | |||
| 55 | FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" | ||
