]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: unlink private resolv.conf on exit 4635/head
authorChristian Hesse <mail@eworm.de>
Wed, 9 Nov 2016 16:13:28 +0000 (17:13 +0100)
committerChristian Hesse <mail@eworm.de>
Thu, 10 Nov 2016 13:23:33 +0000 (14:23 +0100)
This fixes the logic with systemd-nspawn which checks for private
resov.conf to decide whether or not to mount it into the container.

src/resolve/resolved.c

index deb75f9ae54842c25c716a3bbfea058a8a3d14fb..8d5a5c6b79039e92733eb23657ba19c2eaa01fd7 100644 (file)
@@ -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...");