aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xiurt22
-rw-r--r--lib/Iurt/Chroot.pm6
2 files changed, 4 insertions, 4 deletions
diff --git a/iurt2 b/iurt2
index ccb3202..9b7951f 100755
--- a/iurt2
+++ b/iurt2
@@ -705,7 +705,7 @@ if (!$run{use_old_chroot}) {
if (!-d $chroot_tmp) {
mkdir $chroot_tmp;
} else {
- remove_chroot(\%run, $chroot_tmp, $chroot_name);
+ remove_chroot(\%run, $config, $chroot_tmp, $chroot_name);
}
mkdir_p("$chroot_tmp/$run{user}");
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index 4d6478f..4a51144 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -208,7 +208,7 @@ sub create_temp_chroot {
}
sub remove_chroot {
- my ($run, $dir, $prefix) = @_;
+ my ($run, $config, $dir, $prefix) = @_;
plog("Remove existing chroot");
plog('DEBUG', "... dir $dir all $run->{clean_all} prefix $prefix");
@@ -218,12 +218,12 @@ sub remove_chroot {
foreach (readdir $chroot_dir) {
next if !-d "$dir/$_" || /\.{1,2}/;
plog("cleaning old chroot for $_ in $dir");
- clean_all_chroot_tmp($run, "$dir/$_", $prefix);
+ clean_all_chroot_tmp($run, $config, "$dir/$_", $prefix);
}
} else {
foreach my $user (@{$run->{clean}}) {
plog("cleaning old chroot for $user in $dir");
- clean_all_chroot_tmp($run, "$dir/$user", $prefix);
+ clean_all_chroot_tmp($run, $config, "$dir/$user", $prefix);
}
}
}