diff options
author | Pascal Terjan <pterjan@mageia.org> | 2017-10-03 19:13:31 +0100 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2017-10-03 21:05:27 +0100 |
commit | 71f07edd672a9d05f8ddb68d674f4f8811fec9a1 (patch) | |
tree | c10ae073960de6170f70dccccf0b7b081953735e /lib | |
parent | 227a7b4f441a4d174b8862a7ab43b469f0ab7f64 (diff) | |
download | iurt-71f07edd672a9d05f8ddb68d674f4f8811fec9a1.tar iurt-71f07edd672a9d05f8ddb68d674f4f8811fec9a1.tar.gz iurt-71f07edd672a9d05f8ddb68d674f4f8811fec9a1.tar.bz2 iurt-71f07edd672a9d05f8ddb68d674f4f8811fec9a1.tar.xz iurt-71f07edd672a9d05f8ddb68d674f4f8811fec9a1.zip |
Use a network namespace for builds
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Iurt/Chroot.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index 362c7e7..ea26655 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -238,6 +238,8 @@ sub clean_all_chroot_tmp { sub delete_chroot { my ($run, $config, $chroot) = @_; + # This also kills any process in the associated namespace + sudo($config, '--netns_delete', $chroot); _clean_mounts($run, $config, $chroot); plog(1, "cleaning $chroot"); @@ -313,6 +315,10 @@ sub create_build_chroot { } } } + + if ($ret) { + sudo($config, '--netns_create', $chroot); + } return $ret; } |