fi
# Remove temporary mountpoint again
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
if [ -d "$MNTPOINT" ] ; then
fi
# Remove temporary mountpoint again
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
if [ -d "$MNTPOINT" ] ; then
# remove directory only if we used the default with process id inside the name
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
# remove directory only if we used the default with process id inside the name
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
# if dm-mod isn't available then kpartx will fail with
# "Is device-mapper driver missing from kernel? [...]"
# if dm-mod isn't available then kpartx will fail with
# "Is device-mapper driver missing from kernel? [...]"
if ! grep -q 'device-mapper' /proc/misc >/dev/null 2>&1 ; then
eerror "Device-mapper support missing in kernel."
bailout 1
if ! grep -q 'device-mapper' /proc/misc >/dev/null 2>&1 ; then
eerror "Device-mapper support missing in kernel."
bailout 1
if [ "$ARCH" = 'arm64' ]; then
einfo "Setting up GPT partitions for arm64"
parted -s "${TARGET}" 'mklabel gpt'
if [ "$ARCH" = 'arm64' ]; then
einfo "Setting up GPT partitions for arm64"
parted -s "${TARGET}" 'mklabel gpt'