#include "dhcp-lease-internal.h"
#include "network-internal.h"
#include "conf-parser.h"
-#include "mkdir.h"
static int set_fallback_dns(Manager *m, const char *string) {
char *word, *state;
}
int manager_update_resolv_conf(Manager *m) {
+ const char *path = "/run/systemd/resolve/resolv.conf";
_cleanup_free_ char *temp_path = NULL;
_cleanup_fclose_ FILE *f = NULL;
_cleanup_free_ unsigned *indices = NULL;
assert(m);
- r = fopen_temporary("/run/systemd/network/resolv.conf", &f, &temp_path);
+ r = fopen_temporary(path, &f, &temp_path);
if (r < 0)
return r;
fflush(f);
- if (ferror(f) || rename(temp_path, "/run/systemd/network/resolv.conf") < 0) {
+ if (ferror(f) || rename(temp_path, path) < 0) {
r = -errno;
- unlink("/run/systemd/network/resolv.conf");
+ unlink(path);
unlink(temp_path);
return r;
}