mirror of
https://github.com/systemd/systemd.git
synced 2025-03-29 06:50:16 +03:00
resolved: emit full path to file we failed to write
Otherwise it's unclear if it's /etc/resolv.conf or some other file that is meant.
This commit is contained in:
parent
9e83569d8f
commit
77abf3c115
@ -288,7 +288,7 @@ static int on_network_event(sd_event_source *s, int fd, uint32_t revents, void *
|
||||
|
||||
r = manager_write_resolv_conf(m);
|
||||
if (r < 0)
|
||||
log_warning_errno(r, "Could not update resolv.conf: %m");
|
||||
log_warning_errno(r, "Could not update "PRIVATE_RESOLV_CONF": %m");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -226,8 +226,6 @@ static int write_resolv_conf_contents(FILE *f, OrderedSet *dns, OrderedSet *doma
|
||||
|
||||
int manager_write_resolv_conf(Manager *m) {
|
||||
|
||||
#define PRIVATE_RESOLV_CONF "/run/systemd/resolve/resolv.conf"
|
||||
|
||||
_cleanup_ordered_set_free_ OrderedSet *dns = NULL, *domains = NULL;
|
||||
_cleanup_free_ char *temp_path = NULL;
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
|
@ -23,5 +23,7 @@
|
||||
|
||||
#include "resolved-manager.h"
|
||||
|
||||
#define PRIVATE_RESOLV_CONF "/run/systemd/resolve/resolv.conf"
|
||||
|
||||
int manager_read_resolv_conf(Manager *m);
|
||||
int manager_write_resolv_conf(Manager *m);
|
||||
|
@ -91,7 +91,7 @@ int main(int argc, char *argv[]) {
|
||||
* symlink */
|
||||
r = manager_write_resolv_conf(m);
|
||||
if (r < 0)
|
||||
log_warning_errno(r, "Could not create resolv.conf: %m");
|
||||
log_warning_errno(r, "Could not create "PRIVATE_RESOLV_CONF": %m");
|
||||
|
||||
sd_notify(false,
|
||||
"READY=1\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user