# Remove temporary mountpoint again
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
if [ -d "$MNTPOINT" ] ; then
- rmdir "$MNTPOINT"
+ rmdir "$MNTPOINT" || true
fi
fi
fi
done
- [ -x "$MNTPOINT"/bin/umount ] && chroot "$MNTPOINT" umount -a >/dev/null 2>&1
+ [ -x "$MNTPOINT"/bin/umount ] && chroot "$MNTPOINT" umount -a >/dev/null 2>&1 || true
# ugly, but make sure we really don't leave anything (/proc /proc and
# /dev /dev are intended, trying to work around timing issues, see #657023)
for ARG in /run/udev /sys /proc /proc /dev/pts /dev/pts /dev /dev ; do
- [ -x "$MNTPOINT"/bin/umount ] && chroot "$MNTPOINT" umount $ARG >/dev/null 2>&1
- umount "$MNTPOINT"/$ARG >/dev/null 2>&1
+ [ -x "$MNTPOINT"/bin/umount ] && chroot "$MNTPOINT" umount $ARG >/dev/null 2>&1 || true
+ umount "$MNTPOINT"/$ARG >/dev/null 2>&1 || true
done
if [ -n "$ISODIR" ] ; then
- [ -d "$MNTPOINT/$ISODIR" ] && umount "$MNTPOINT/$ISODIR" >/dev/null 2>&1
+ [ -d "$MNTPOINT/$ISODIR" ] && umount "$MNTPOINT/$ISODIR" >/dev/null 2>&1 || true
fi
if [ -n "$DIRECTORY" ] ; then
# source main configuration file {{{
if [ -r /etc/debootstrap/config ] ; then
+ bash -n /etc/debootstrap/config
# shellcheck disable=SC1091
. /etc/debootstrap/config
fi
# source specified configuration file {{{
if [ -n "$CONFIGFILE" ] ; then
einfo "Reading specified config file $CONFIGFILE."
+ bash -n "$CONFIGFILE"
# shellcheck disable=SC1091 source=config
if ! . "$CONFIGFILE" ; then
eerror "Error reading config file $CONFIGFILE" ; bailout 1
fi
# make sure loop module is present and a usable loop device exists
- modprobe -q loop
+ modprobe loop || true
if ! losetup -f >/dev/null 2>&1; then
eerror "Error finding usable loop device"
bailout 1
# if dm-mod isn't available then kpartx will fail with
# "Is device-mapper driver missing from kernel? [...]"
- modprobe -q dm-mod
+ modprobe dm-mod || true
if ! grep -q 'device-mapper' /proc/misc >/dev/null 2>&1 ; then
eerror "Device-mapper support missing in kernel."
bailout 1