From: Daniel Golle Date: Mon, 13 Apr 2020 01:03:53 +0000 (+0100) Subject: jail: replace /etc/resolv.conf with symlink in extroot+overlay X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a4d644228ff60ec2ac8775b64dcaea4608ce6063;p=oweals%2Fprocd.git jail: replace /etc/resolv.conf with symlink in extroot+overlay Signed-off-by: Daniel Golle --- diff --git a/jail/jail.c b/jail/jail.c index 052a78e..87b671b 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -254,6 +254,8 @@ static int build_jail_fs(void) snprintf(jailetc, PATH_MAX, "%s/etc", jail_root); mkdir_p(jailetc, 0755); snprintf(jaillink, PATH_MAX, "%s/etc/resolv.conf", jail_root); + if (overlaydir) + unlink(jaillink); symlink("../tmp/resolv.conf.d/resolv.conf.auto", jaillink); }