ignore exit code of blkid as it might fail on some file systems
[grml-debootstrap.git] / chroot-script
index 2c29465..1602f6d 100755 (executable)
@@ -17,8 +17,10 @@ set -o pipefail
 trap "error_handler" ERR
 # }}}
 
+bash -n /etc/debootstrap/config
 # shellcheck source=config
 . /etc/debootstrap/config    || exit 1
+bash -n /etc/debootstrap/variables
 # shellcheck source=tests/shellcheck-stub-debootstrap-variables
 . /etc/debootstrap/variables || exit 1
 
@@ -477,7 +479,7 @@ EOF
     local rootfs_mount_options=""
 
     if [ -z "${FILESYSTEM}" ] ; then
-      FILESYSTEM="$(blkid -o value -s TYPE /dev/disk/by-uuid/"${TARGET_UUID}")"
+      FILESYSTEM="$(blkid -o value -s TYPE /dev/disk/by-uuid/"${TARGET_UUID}")" || true
     fi
 
     case "${FILESYSTEM}" in
@@ -803,9 +805,9 @@ trap signal_handler HUP INT QUIT TERM
      initrd grub_install passwords \
      custom_scripts upgrade_system remove_apt_cache services \
      remove_chrootmirror; do
-     if stage $i ; then
-       $i || exit 1
-       stage $i 'done'
+     if stage "$i" ; then
+       "$i"
+       stage "$i" 'done'
      fi
   done
   # always execute the finalize stage: