[Fuego] [PATCH 2/3] nosyslogd.dist: support targets without syslogd

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Thu Oct 13 09:31:33 UTC 2016


Some targets may not use syslogd (or alternatives). In that case
nologread.dist will not work either because it tries to
access /var/log/messages which is not created. For those targets
this dist can be used (set it on Jenkins > Configure Target)

Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
 engine/overlays/distribs/nosyslogd.dist | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 engine/overlays/distribs/nosyslogd.dist

diff --git a/engine/overlays/distribs/nosyslogd.dist b/engine/overlays/distribs/nosyslogd.dist
new file mode 100644
index 0000000..fab7d09
--- /dev/null
+++ b/engine/overlays/distribs/nosyslogd.dist
@@ -0,0 +1,16 @@
+inherit "base-distrib"
+
+override-func ov_logger() {
+	cmd "echo $@ >> /tmp/fake-syslog" || abort_job "Could not execute ROOTFS_LOGGER command"
+}
+
+override-func ov_rootfs_logread() {
+	if [ ! -f /tmp/fake-syslog ]; then
+		cmd touch /tmp/fake-syslog
+	fi
+
+	cmd "mkdir -p /tmp/fuego.${1} && cd /tmp/fuego.${1} && \
+		cat /tmp/fake-syslog > ${NODE_NAME}.${BUILD_ID}.${BUILD_NUMBER}.$2" || \
+		abort_job "Error while ROOTFS_LOGREAD command execution on target"
+}
+
-- 
2.7.4




More information about the Fuego mailing list