diff options
Diffstat (limited to 'lib/Iurt/Chroot.pm')
-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; } |