From: Jackie Huang Date: Tue, 5 May 2020 08:02:55 +0000 (+0800) Subject: systemd: remove the log message about /var/run X-Git-Tag: bronze-rc3~14 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=bd71effc849c7a0b27f8c01190a3164b214b6cfb;p=pti%2Frtp.git systemd: remove the log message about /var/run There are many services still using /var/run for pid file, so there are lots of log message about changing /var/run to /run, which is harmless but annoying, so move such messages. Issue-ID: INF-127 Signed-off-by: Jackie Huang Change-Id: I8ec7325f64b57b7cc9e0250235680d39e602fb3f --- diff --git a/meta-stx/recipes-core/systemd/files/0001-systemd-remove-the-log-about-var-run.patch b/meta-stx/recipes-core/systemd/files/0001-systemd-remove-the-log-about-var-run.patch new file mode 100644 index 0000000..89fc4eb --- /dev/null +++ b/meta-stx/recipes-core/systemd/files/0001-systemd-remove-the-log-about-var-run.patch @@ -0,0 +1,55 @@ +From f7c80240b43fbf79ccca366b512874c271771818 Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Tue, 5 May 2020 16:00:34 +0800 +Subject: [PATCH] systemd: remove the log about /var/run + +Signed-off-by: Jackie Huang +--- + src/core/dbus-service.c | 3 --- + src/core/load-fragment.c | 2 -- + src/tmpfiles/tmpfiles.c | 2 -- + 3 files changed, 7 deletions(-) + +diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c +index 0eb336c..baf7343 100644 +--- a/src/core/dbus-service.c ++++ b/src/core/dbus-service.c +@@ -341,9 +341,6 @@ static int bus_service_set_transient_property( + if (!z) + return log_oom(); + +- if (!UNIT_WRITE_FLAGS_NOOP(flags)) +- log_unit_notice(u, "Transient unit's PIDFile= property references path below legacy directory /var/run, updating %s → %s; please update client accordingly.", n, z); +- + free_and_replace(n, z); + } + } +diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c +index 537bca3..4ffac83 100644 +--- a/src/core/load-fragment.c ++++ b/src/core/load-fragment.c +@@ -4286,8 +4286,6 @@ int config_parse_pid_file( + if (!z) + return log_oom(); + +- log_syntax(unit, LOG_NOTICE, filename, line, 0, "PIDFile= references path below legacy directory /var/run/, updating %s → %s; please update the unit file accordingly.", n, z); +- + free_and_replace(*s, z); + } else + free_and_replace(*s, n); +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index b66765b..bfce982 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -2479,8 +2479,6 @@ static int patch_var_run(const char *fname, unsigned line, char **path) { + * there's no immediate need for action by the user. However, in the interest of making things less confusing + * to the user, let's still inform the user that these snippets should really be updated. */ + +- log_notice("[%s:%u] Line references path below legacy directory /var/run/, updating %s → %s; please update the tmpfiles.d/ drop-in file accordingly.", fname, line, *path, n); +- + free_and_replace(*path, n); + + return 0; +-- +2.7.4 + diff --git a/meta-stx/recipes-core/systemd/systemd_241.bbappend b/meta-stx/recipes-core/systemd/systemd_241.bbappend index 11ff015..dfe8eb8 100644 --- a/meta-stx/recipes-core/systemd/systemd_241.bbappend +++ b/meta-stx/recipes-core/systemd/systemd_241.bbappend @@ -17,6 +17,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI += " \ file://0900-inject-milisec-in-syslog-date.patch \ + file://0001-systemd-remove-the-log-about-var-run.patch \ " STX_DEFAULT_LOCALE ?= "en_US.UTF-8"