aboutsummaryrefslogtreecommitdiffstats
path: root/iurt_root_command
diff options
context:
space:
mode:
Diffstat (limited to 'iurt_root_command')
-rwxr-xr-xiurt_root_command6
1 files changed, 5 insertions, 1 deletions
diff --git a/iurt_root_command b/iurt_root_command
index 18068d0..df9b5e5 100755
--- a/iurt_root_command
+++ b/iurt_root_command
@@ -418,7 +418,11 @@ sub netfs_create {
check_path_authorized($dest) or return;
my $nsname = basename($dest);
system("ip", "netns", "add", $nsname) and return;
- return !system("ip", "netns", "exec", $nsname, "ifconfig", "lo", "up");
+ system("ip", "netns", "exec", $nsname, "ifconfig", "lo", "up");
+ my $hostname = `hostname`;
+ system("echo '127.0.0.1 localhost $hostname' > $dest/etc/hosts");
+ system("echo > $dest/etc/resolv.conf");
+ return 1;
}
sub netfs_delete {