aboutsummaryrefslogtreecommitdiffstats
path: root/iurt_root_command
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2017-10-05 22:57:04 +0100
committerPascal Terjan <pterjan@mageia.org>2017-10-05 22:57:04 +0100
commitb9cb83f384201e038c699c0bfc3ef16d5aad2eac (patch)
tree1816b56ebcb77f95d2c6fd1d8d08809081623326 /iurt_root_command
parent435e218e4dcc413e1d74f1ad39c7882de5b9b7ee (diff)
downloadiurt-b9cb83f384201e038c699c0bfc3ef16d5aad2eac.tar
iurt-b9cb83f384201e038c699c0bfc3ef16d5aad2eac.tar.gz
iurt-b9cb83f384201e038c699c0bfc3ef16d5aad2eac.tar.bz2
iurt-b9cb83f384201e038c699c0bfc3ef16d5aad2eac.tar.xz
iurt-b9cb83f384201e038c699c0bfc3ef16d5aad2eac.zip
Networking fixes
Diffstat (limited to 'iurt_root_command')
-rwxr-xr-xiurt_root_command4
1 files changed, 4 insertions, 0 deletions
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");