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

This fixes #338 and fixes #294
This commit is contained in:
Serge Schneider 2019-10-30 13:23:35 +00:00
parent 336ff2107e
commit 19c0188798

View File

@ -17,8 +17,9 @@ bootstrap(){
BOOTSTRAP_ARGS+=(--components "main,contrib,non-free") BOOTSTRAP_ARGS+=(--components "main,contrib,non-free")
BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg") BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
BOOTSTRAP_ARGS+=("$@") 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 if [ -d "$2/debootstrap" ]; then
rmdir "$2/debootstrap" rmdir "$2/debootstrap"