From b9cb83f384201e038c699c0bfc3ef16d5aad2eac Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 5 Oct 2017 22:57:04 +0100 Subject: Networking fixes --- NEWS | 2 ++ iurt_root_command | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 22649d8..b24db7f 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ - iurt: add an option to disable the use of network namespaces - iurt, ulri, emi: allow overriding a true config value with a false one and add some tests. +- iurt: add a (really broken) default route on interface lo +- iurt: fix dns configuration in chroot whn using netns 0.7.1 - iurt: also use --urpmi-root for urpmi.addmedia diff --git a/iurt_root_command b/iurt_root_command index 971b690..5478df7 100755 --- a/iurt_root_command +++ b/iurt_root_command @@ -419,6 +419,10 @@ sub netns_create { my $nsname = basename($dest); system("ip", "netns", "add", $nsname) and return; system("ip", "netns", "exec", $nsname, "ifconfig", "lo", "up"); + # We don't configure a DNS server so make sure one is not excepted + system("sed -i |^hosts:|hosts: files| $dest/etc/nsswitch.conf"); + # Some packages want a default route + system("ip", "netns", "exec", $nsname, "ip", "route", "add", "0.0.0.0/0", "dev", "lo"); my $hostname = `hostname`; system("echo '127.0.0.1 localhost $hostname' > $dest/etc/hosts"); system("echo > $dest/etc/resolv.conf"); -- cgit v1.2.1