From 80e909a9c7d943dfdca3156c78deab8d4c09e2b5 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Tue, 6 Aug 2019 13:30:18 +0200 Subject: [PATCH] Exit on some commands failure --- debian/chroot.install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/chroot.install b/debian/chroot.install index 536848a..dbc7751 100755 --- a/debian/chroot.install +++ b/debian/chroot.install @@ -43,7 +43,7 @@ dbs_pkg_include="aptitude,btrfs-progs,bzip2,debconf-i18n,dialog,dmsetup,htop,isc # Prepare host system {{{ apt update -apt install -y coreutils debootstrap e2fsprogs gawk ipcalc lvm2 parted util-linux wget +apt install -y coreutils debootstrap e2fsprogs gawk ipcalc lvm2 parted util-linux wget || exit 1 # }}} # Partitionning {{{ if [ "${manage_part}" -eq 0 ]; then @@ -168,7 +168,7 @@ fi swapon -- /dev/mapper/"${vgname}"-swap ## }}} ## Run debootstrap -debootstrap --arch amd64 --include="${dbs_pkg_include}" --exclude="${dbs_pkg_exclude}" "${debian_version}" /target http://ftp.fr.debian.org/debian +debootstrap --arch amd64 --include="${dbs_pkg_include}" --exclude="${dbs_pkg_exclude}" "${debian_version}" /target http://ftp.fr.debian.org/debian || exit 1 # }}} # Configure system {{{