mirror of
https://github.com/systemd/systemd.git
synced 2025-03-22 06:50:18 +03:00
resolved: debug log about resolv.conf lines we don't grok
This commit is contained in:
parent
e40ec7de3a
commit
b351c300ee
@ -68,6 +68,7 @@ int manager_read_resolv_conf(Manager *m) {
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
struct stat st;
|
||||
char line[LINE_MAX];
|
||||
unsigned n = 0;
|
||||
int r;
|
||||
|
||||
assert(m);
|
||||
@ -118,8 +119,10 @@ int manager_read_resolv_conf(Manager *m) {
|
||||
const char *a;
|
||||
char *l;
|
||||
|
||||
n++;
|
||||
|
||||
l = strstrip(line);
|
||||
if (IN_SET(*l, '#', ';'))
|
||||
if (IN_SET(*l, '#', ';', 0))
|
||||
continue;
|
||||
|
||||
a = first_word(l, "nameserver");
|
||||
@ -139,6 +142,8 @@ int manager_read_resolv_conf(Manager *m) {
|
||||
if (r < 0)
|
||||
log_warning_errno(r, "Failed to parse search domain string '%s', ignoring.", a);
|
||||
}
|
||||
|
||||
log_syntax(NULL, LOG_DEBUG, "/etc/resolv.conf", n, 0, "Ignoring resolv.conf line: %s", l);
|
||||
}
|
||||
|
||||
m->resolv_conf_mtime = timespec_load(&st.st_mtim);
|
||||
|
Loading…
x
Reference in New Issue
Block a user