summaryrefslogtreecommitdiffstats
path: root/tools/drakx-in-chroot
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-04-04 13:59:23 +0000
committerThierry Vignaud <tv@mageia.org>2013-04-04 13:59:23 +0000
commit425bd3385636d20fa165af7b9b633d68ca98de7f (patch)
treea8d973c6cee3ce067f89ef5c2f0ccf25d3ce950f /tools/drakx-in-chroot
parent5373550e122e314e60fd4c840b274ec9dc0a67a5 (diff)
downloaddrakx-425bd3385636d20fa165af7b9b633d68ca98de7f.tar
drakx-425bd3385636d20fa165af7b9b633d68ca98de7f.tar.gz
drakx-425bd3385636d20fa165af7b9b633d68ca98de7f.tar.bz2
drakx-425bd3385636d20fa165af7b9b633d68ca98de7f.tar.xz
drakx-425bd3385636d20fa165af7b9b633d68ca98de7f.zip
do not copy /etc/resolv.conf in chroot if not needed
only copy it if using either remote display or remote repository (thus fixing goup lookups, mga#9326) rationale: copying /etc/resolv.conf in installer chroot prevent librpm to load some NSS modules, which results in failure to lookup groups when chrooted in the _installed_ system
Diffstat (limited to 'tools/drakx-in-chroot')
-rwxr-xr-xtools/drakx-in-chroot4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/drakx-in-chroot b/tools/drakx-in-chroot
index 43917fff7..d751896c7 100755
--- a/tools/drakx-in-chroot
+++ b/tools/drakx-in-chroot
@@ -118,7 +118,9 @@ mkdir_p("$dir/dev");
eval { cp_af($_, "$dir$_") } foreach qw(/dev/root);
#- if the DISPLAY is remote, we may need to resolve the name:
-eval { cp_af('/etc/resolv.conf', "$SLASH_LOCATION$_") };
+if ($remote_repository || $ENV{DISPLAY} !~ /^:/) {
+ eval { cp_af('/etc/resolv.conf', "$SLASH_LOCATION$_") };
+}
{
chomp(my $kernel_version = `uname -r`);