Skip to content

Commit

Permalink
[2]change SOL log name and rechange config to upload it to remote log
Browse files Browse the repository at this point in the history
  • Loading branch information
MickeyZhan committed Jul 19, 2019
1 parent 881f670 commit a50556e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
# 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA
#
exec /usr/local/bin/mTerm_server as58xx-cl /dev/ttyS1
exec /usr/local/bin/mTerm_server console /dev/ttyS1
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ bufStore* createBuffer(const char *dev, int fsize) {
}

ret = snprintf(buf->backupfile, sizeof(buf->backupfile),
"/var/log/mTerm_%s_backup.log", dev);
"/var/log/%s_backup.log", dev);
if ((ret < 0) || (ret >= sizeof(buf->backupfile))) {
perror("mTerm: Received dev name too long to create backup buffer file");
free(buf);
Expand Down
7 changes: 7 additions & 0 deletions meta-celestica/recipes-extended/rsyslog/files/logrotate.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp and btmp -- we'll rotate them here


Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
delaycompress
compress
postrotate
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || /etc/init.d/syslog.rsyslog restart 2> /dev/null
endscript
}

Expand All @@ -22,4 +22,7 @@
size 20M
delaycompress
compress
postrotate
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || /etc/init.d/syslog.rsyslog restart 2> /dev/null
endscript
}
2 changes: 2 additions & 0 deletions meta-celestica/recipes-extended/rsyslog/rsyslog_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://rsyslog.conf \
file://rsyslog.logrotate \
file://rotate_console_log \
file://logrotate.conf \
"

do_install_append() {
Expand All @@ -11,6 +12,7 @@ do_install_append() {
install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.rsyslog
install -m 755 ${WORKDIR}/rotate_console_log ${dst}/console_log
install -m 644 ${WORKDIR}/logrotate.conf ${D}${sysconfdir}/logrotate.conf

sed -i "s/__PLATFORM_NAME__/${MACHINE}/g;s/__OPENBMC_VERSION__/${OPENBMC_VERSION}/g" ${D}${sysconfdir}/rsyslog.conf
}
Expand Down

0 comments on commit a50556e

Please sign in to comment.