diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-04-04 13:59:23 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-04-04 13:59:23 +0000 |
commit | a7e83eb8ed98791c25f0e4768ac7e6ae6e49fe21 (patch) | |
tree | a8d973c6cee3ce067f89ef5c2f0ccf25d3ce950f /tools | |
parent | c8a623918a052358d8c9444cc319b14e6f89c7a0 (diff) | |
download | drakx-backup-do-not-use-a7e83eb8ed98791c25f0e4768ac7e6ae6e49fe21.tar drakx-backup-do-not-use-a7e83eb8ed98791c25f0e4768ac7e6ae6e49fe21.tar.gz drakx-backup-do-not-use-a7e83eb8ed98791c25f0e4768ac7e6ae6e49fe21.tar.bz2 drakx-backup-do-not-use-a7e83eb8ed98791c25f0e4768ac7e6ae6e49fe21.tar.xz drakx-backup-do-not-use-a7e83eb8ed98791c25f0e4768ac7e6ae6e49fe21.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')
-rwxr-xr-x | tools/drakx-in-chroot | 4 |
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`); |