summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/drakx-in-chroot4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/drakx-in-chroot b/tools/drakx-in-chroot
index fe54207b7..8cce19859 100644
--- a/tools/drakx-in-chroot
+++ b/tools/drakx-in-chroot
@@ -29,11 +29,13 @@ if (-d $SLASH_LOCATION) {
umount_all() == 0 or die "$SLASH_LOCATION is busy\n";
sys("$sudo rm -rf $SLASH_LOCATION/var/lib/rpm $SLASH_LOCATION/dev/mapper");
rm_rf($SLASH_LOCATION);
- rm_rf(glob("$dir/*")) if $ENV{CLEAN};
}
mkdir_p("$SLASH_LOCATION$_") foreach '/dev', '/dev/usb', '/etc', '/var', '/proc', $STAGE2_LOCATION_ROOTED, $IMAGE_LOCATION_ROOTED, $prefix_ROOTED;
+sys("$sudo rm -rf $dir") if $ENV{CLEAN};
+-e $dir or sys("$sudo mkdir -p $dir");
+
if (-d "$repository/$LIVE_LOCATION_REL") {
sys("$sudo mount -o bind $repository/$LIVE_LOCATION_REL $STAGE2_LOCATION");
} elsif (-e "$repository/$CLP_FILE_REL") {