summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-09-04 18:12:43 +0000
committerThierry Vignaud <tv@mageia.org>2012-09-04 18:12:43 +0000
commit81c51f25c9d99546175d08b68aafff424df1bb26 (patch)
treecf1caddfd2daa8c88b4933282648296c426b6f7a
parent0c30747ef90647337b50cc02bcc5490c52944e78 (diff)
downloaddrakx-net-81c51f25c9d99546175d08b68aafff424df1bb26.tar
drakx-net-81c51f25c9d99546175d08b68aafff424df1bb26.tar.gz
drakx-net-81c51f25c9d99546175d08b68aafff424df1bb26.tar.bz2
drakx-net-81c51f25c9d99546175d08b68aafff424df1bb26.tar.xz
drakx-net-81c51f25c9d99546175d08b68aafff424df1bb26.zip
(connected) use chroot's /etc/resolv.conf if stage1 didn't write any
(Derek Jennings, mga#5772)
-rw-r--r--NEWS2
-rw-r--r--lib/network/tools.pm4
2 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index a335567..3fb4267 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- use chroot's /etc/resolv.conf if stage1 didn't write any
+ (Derek Jennings, mga#5772)
- wait for network to show up the same way as in the installer
(Derek Jennings, mga#5830)
diff --git a/lib/network/tools.pm b/lib/network/tools.pm
index 7a94d84..cdb556c 100644
--- a/lib/network/tools.pm
+++ b/lib/network/tools.pm
@@ -48,6 +48,10 @@ sub stop_net_interface {
}
sub connected() {
+ # if no resolv.conf from stage1, use the one we wrote in chroot:
+ if ($::isInstall && ! -e "/etc/resolv.conf") {
+ symlink "$::prefix/etc/resolv.conf", "/etc/resolv.conf";
+ }
c::res_init(); # reinit the resolver so DNS changes take affect
gethostbyname("www.mageia.org") ? 1 : 0;
}