const char *e;
char *z;
+ int log_level;
e = path_startswith(*path, "/var/run/");
if (!e)
if (!z)
return log_oom();
- log_syntax(unit, LOG_NOTICE, filename, line, 0,
+ log_level = path_startswith(filename, "/etc") ? LOG_NOTICE : LOG_DEBUG;
+ log_syntax(unit, log_level, filename, line, 0,
"%s= references a path below legacy directory /var/run/, updating %s → %s; "
"please update the unit file accordingly.", lvalue, *path, z);
if (!fpath)
return log_oom();
- log_struct(LOG_WARNING,
+ log_struct(LOG_DEBUG,
LOG_MESSAGE("SysV service '%s' lacks a native systemd unit file. "
"%s Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it safe, robust and future-proof. "
"%s This compatibility logic is deprecated, expect removal soon. %s",
static int patch_var_run(const char *fname, unsigned line, char **path) {
const char *k;
char *n;
+ int log_level;
assert(path);
assert(*path);
/* Also log about this briefly. We do so at LOG_NOTICE level, as we fixed up the situation automatically, hence
* 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_syntax(NULL, LOG_NOTICE, fname, line, 0,
+ log_level = path_startswith(fname, "/etc") ? LOG_NOTICE : LOG_DEBUG;
+ log_syntax(NULL, log_level, fname, line, 0,
"Line references path below legacy directory /var/run/, updating %s → %s; please update the tmpfiles.d/ drop-in file accordingly.",
*path, n);