diff options
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | iurt_root_command | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -1,4 +1,4 @@ -- iurt: bring lo up in the chroot +- iurt: bring lo up in the chroot and point hostname to 127.0.0.1 0.7.1 - iurt: also use --urpmi-root for urpmi.addmedia 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 { |