path-lookup: downgrade again the messages where we log for units

This partially reverts 7ad94c716d.

After that commit commands such as "systemctl enable" and friends
printed the search path information multiple times in its output, which
is ugly.

If we want the search paths to be printed at a higher log level, then we
should do this in PID 1 only, i.e. split the printing out of the normal
path lookup logic and invoke that explicitly from PID 1 but not in the
auxiliary tools.
This commit is contained in:
Lennart Poettering 2013-03-01 14:07:20 +01:00
parent d6cb60c7a0
commit 242c4e1cc4

View file

@ -325,9 +325,9 @@ int lookup_paths_init(
char _cleanup_free_ *t = strv_join(p->unit_path, "\n\t");
if (!t)
return -ENOMEM;
log_info("Looking for unit files in (higher priority first):\n\t%s", t);
log_debug("Looking for unit files in (higher priority first):\n\t%s", t);
} else {
log_info("Ignoring unit files.");
log_debug("Ignoring unit files.");
strv_free(p->unit_path);
p->unit_path = NULL;
}
@ -385,9 +385,9 @@ int lookup_paths_init(
char _cleanup_free_ *t = strv_join(p->sysvinit_path, "\n\t");
if (!t)
return -ENOMEM;
log_info("Looking for SysV init scripts in:\n\t%s", t);
log_debug("Looking for SysV init scripts in:\n\t%s", t);
} else {
log_info("Ignoring SysV init scripts.");
log_debug("Ignoring SysV init scripts.");
strv_free(p->sysvinit_path);
p->sysvinit_path = NULL;
}
@ -405,7 +405,7 @@ int lookup_paths_init(
p->sysvrcnd_path = NULL;
}
#else
log_info("SysV init scripts and rcN.d links support disabled");
log_debug("SysV init scripts and rcN.d links support disabled");
#endif
}