From 737ba9fcc005cf9dbb88775373718723b35a73fc Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Sun, 14 Jun 2020 20:58:37 +0000 Subject: Unmount things when additional media fail --- lib/Iurt/Chroot.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index 1427aa3..85b06c4 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -96,8 +96,12 @@ sub clean_and_build_chroot { } if ($run->{additional_media} && $run->{additional_media}{repository}) { - _setup_additional_media($run, $config, $chroot) or return; + if (!_setup_additional_media($run, $config, $chroot)) { + _clean_mounts($run, $config, $chroot); + return; + } } + 1; } -- cgit v1.2.1