summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/drakx-in-chroot4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/drakx-in-chroot b/tools/drakx-in-chroot
index e289ebbaf..dbc319052 100755
--- a/tools/drakx-in-chroot
+++ b/tools/drakx-in-chroot
@@ -56,6 +56,9 @@ if ($>) {
$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
}
+my @mounts;
+my $_b = before_leaving { sys("$sudo umount $_") foreach reverse @mounts };
+
undef $ENV{TMPDIR}; # prevent packdrake faillure on creating temporary files
if (-d $SLASH_LOCATION) {
@@ -200,6 +203,7 @@ sub create_initial_symlinks() {
sub mount {
my ($from, $mntpt, @opts) = @_;
+ push @mounts, $mntpt;
sys("$sudo mount $from $mntpt " . join(' ', @opts));
}