diff options
author | Pascal Terjan <pterjan@mageia.org> | 2017-10-04 09:12:10 +0100 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2017-10-04 09:12:57 +0100 |
commit | 7f45a579b350d4ff449994a92fa3f76919302f01 (patch) | |
tree | 2f8f190f10e2bc45004aa7ea53101a0af8ca2537 /iurt_root_command | |
parent | 8f6713833256ebd299f20c9634262009fafee359 (diff) | |
download | iurt-7f45a579b350d4ff449994a92fa3f76919302f01.tar iurt-7f45a579b350d4ff449994a92fa3f76919302f01.tar.gz iurt-7f45a579b350d4ff449994a92fa3f76919302f01.tar.bz2 iurt-7f45a579b350d4ff449994a92fa3f76919302f01.tar.xz iurt-7f45a579b350d4ff449994a92fa3f76919302f01.zip |
Make sure hostname resolves
Diffstat (limited to 'iurt_root_command')
-rwxr-xr-x | iurt_root_command | 6 |
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 { |