From 074b580797a148df769dea571db8508ed889710b Mon Sep 17 00:00:00 2001 From: Henning Date: Fri, 24 Oct 2014 20:30:31 +0200 Subject: [PATCH] busybox: make it possible to have permanent logfiles * bump the PRINC [holger: Depending on some global settings /var/log will be a symlink to "volatile". But when we log to a file we want it to be persistent. So make sure /var/log is not pointing to volatile but a real directory] --- .../busybox/busybox-systemd/busybox-syslog.default | 10 ++++++++++ recipes-core/busybox/busybox_sysmocom.inc | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/recipes-core/busybox/busybox-systemd/busybox-syslog.default b/recipes-core/busybox/busybox-systemd/busybox-syslog.default index cbc4759..7af2953 100644 --- a/recipes-core/busybox/busybox-systemd/busybox-syslog.default +++ b/recipes-core/busybox/busybox-systemd/busybox-syslog.default @@ -1,2 +1,12 @@ # source the sysvinit configuration file . /etc/syslog-startup.conf + +# check if we want permanent log files and prepare /var/log +if [ "${DESTINATION}" = "buffer" -a ! -h /var/log ]; then + rm -rf /var/log + cd /var + ln -s volatile/log log +elif [ "${DESTINATION}" = "file" -a -h "/var/log" ]; then + rm -rf /var/log + mkdir /var/log +fi diff --git a/recipes-core/busybox/busybox_sysmocom.inc b/recipes-core/busybox/busybox_sysmocom.inc index a3b9c96..13637d3 100644 --- a/recipes-core/busybox/busybox_sysmocom.inc +++ b/recipes-core/busybox/busybox_sysmocom.inc @@ -1,6 +1,6 @@ SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}" FILESEXTRAPATHS_prepend := "${SYSMOCOM}/busybox-${SYSMOCOM_ORIG_PV}:${SYSMOCOM}/files:" -PRINC = "22" +PRINC = "23" SRC_URI += "file://busybox-ifplugd.sh \ file://ifplugd.sh"