Ensure debootstrap runs through 'sh' rather than 'bash'

This fixes #338 and fixes #294
pull/337/head
Serge Schneider 2019-10-30 13:23:35 +00:00
parent 336ff2107e
commit 19c0188798
1 changed files with 2 additions and 1 deletions

View File

@ -17,8 +17,9 @@ bootstrap(){
BOOTSTRAP_ARGS+=(--components "main,contrib,non-free")
BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
BOOTSTRAP_ARGS+=("$@")
printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}"
setarch linux32 capsh --drop=cap_setfcap -- "${BOOTSTRAP_CMD}" "${BOOTSTRAP_ARGS[@]}" || true
setarch linux32 capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true
if [ -d "$2/debootstrap" ]; then
rmdir "$2/debootstrap"