summaryrefslogtreecommitdiff
path: root/functions/exit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/exit.sh')
-rwxr-xr-xfunctions/exit.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/functions/exit.sh b/functions/exit.sh
index 32340a481..675afa2de 100755
--- a/functions/exit.sh
+++ b/functions/exit.sh
@@ -21,7 +21,7 @@ Exit ()
# Skip if we have not yet completed the initial bootstrapping (bootstrap_debootstrap)
# (nothing to be done; avoids unhelpful messages)
- if [ ! -e .build/bootstrap ]; then
+ if ! Stagefile_exists bootstrap; then
return ${VALUE}
fi
@@ -43,10 +43,12 @@ Exit ()
done
fi
- rm -f .build/chroot_devpts
- rm -f .build/chroot_proc
- rm -f .build/chroot_selinuxfs
- rm -f .build/chroot_sysfs
+ STAGEFILES_DIR="$(Stagefiles_dir)"
+
+ rm -f "${STAGEFILES_DIR}"/chroot_devpts
+ rm -f "${STAGEFILES_DIR}"/chroot_proc
+ rm -f "${STAGEFILES_DIR}"/chroot_selinuxfs
+ rm -f "${STAGEFILES_DIR}"/chroot_sysfs
Echo_message "Saving caches..."
@@ -54,7 +56,7 @@ Exit ()
# but let's assume that if there's any binary stage file arround
# we are in binary stage.
- if ls .build/binary* > /dev/null 2>&1
+ if ls "${STAGEFILES_DIR}"/binary* > /dev/null 2>&1
then
Save_package_cache binary
else