diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-06-15 21:00:52 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-06-15 21:34:52 +0300 |
commit | 057594a8bb8d062d72244196170c2d78947d318a (patch) | |
tree | bd0ce34dac9b401ce5ac6919f1cd85239c526b82 /meta-openbmc-mods/meta-common/recipes-extended | |
parent | 0ccb93d91de41b7db333efccc1aa8d03db1ef63f (diff) | |
download | openbmc-057594a8bb8d062d72244196170c2d78947d318a.tar.xz |
Update to internal 0.59
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-extended')
3 files changed, 32 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.service b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.service new file mode 100644 index 000000000..8f3a2bc31 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.service @@ -0,0 +1,9 @@ +[Unit] +Description=Rotate the event logs + +[Service] +Type=simple +ExecStart=/usr/bin/rotate-event-logs.sh + +[Install] +WantedBy=multi-user.target diff --git a/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.sh b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.sh new file mode 100644 index 000000000..5a8c5cc10 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +while true; do + sleep 60 + /usr/sbin/logrotate /etc/logrotate.d/logrotate.rsyslog + ec=$? + if [ $ec -ne 0 ] ; then + echo "logrotate failed ($ec)" + fi +done diff --git a/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend new file mode 100644 index 000000000..78c3b31af --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend @@ -0,0 +1,13 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://rotate-event-logs.service \ + file://rotate-event-logs.sh \ +" + +do_install_append() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/rotate-event-logs.sh ${D}/${bindir}/rotate-event-logs.sh + rm ${D}${systemd_system_unitdir}/rotate-event-logs.timer +} + +SYSTEMD_SERVICE_${PN}_remove = "rotate-event-logs.timer" |