From: Christian Hesse Date: Wed, 9 Nov 2016 16:13:28 +0000 (+0100) Subject: resolved: unlink private resolv.conf on exit X-Git-Tag: v233~435^2 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=commitdiff_plain;h=01e1bb7f9c5adfb3afbb15f666c363b85ace9e31 resolved: unlink private resolv.conf on exit This fixes the logic with systemd-nspawn which checks for private resov.conf to decide whether or not to mount it into the container. --- diff --git a/src/resolve/resolved.c b/src/resolve/resolved.c index deb75f9ae54..8d5a5c6b790 100644 --- a/src/resolve/resolved.c +++ b/src/resolve/resolved.c @@ -112,6 +112,10 @@ int main(int argc, char *argv[]) { sd_event_get_exit_code(m->event, &r); finish: + /* systemd-nspawn checks for private resov.conf to decide whether + or not to mount it into the container. So just delete it. */ + (void) unlink(PRIVATE_RESOLV_CONF); + sd_notify(false, "STOPPING=1\n" "STATUS=Shutting down...");