summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/common6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/common b/scripts/common
index 6586052..2733fd8 100644
--- a/scripts/common
+++ b/scripts/common
@@ -22,8 +22,10 @@ bootstrap(){
capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true
- if [ -d "$2/debootstrap" ]; then
- rmdir "$2/debootstrap"
+ if [ -d "$2/debootstrap" ] && ! rmdir "$2/debootstrap"; then
+ cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}"
+ log "bootstrap failed: please check ${STAGE_WORK_DIR}/debootstrap.log"
+ return 1
fi
}
export -f bootstrap