From 3eaa198c97fb495fd117cd936aef85022c581dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 13 Dec 2013 04:29:29 +0100 Subject: [PATCH] fedora: improve error handling Interrupt build process when error encountered. --- scripts_fedora/02_install_groups.sh | 2 ++ scripts_fedora/04_install_qubes.sh | 6 ++++-- scripts_fedora/add_3rd_party_software.sh | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts_fedora/02_install_groups.sh b/scripts_fedora/02_install_groups.sh index 668c6fc..87734da 100755 --- a/scripts_fedora/02_install_groups.sh +++ b/scripts_fedora/02_install_groups.sh @@ -15,3 +15,5 @@ yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR $PKGGROUPS | yum update -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR || RETCODE=1 umount mnt/proc + +exit $RETCODE diff --git a/scripts_fedora/04_install_qubes.sh b/scripts_fedora/04_install_qubes.sh index 6689335..f3a5e90 100755 --- a/scripts_fedora/04_install_qubes.sh +++ b/scripts_fedora/04_install_qubes.sh @@ -4,9 +4,11 @@ mount -t proc proc $PWD/mnt/proc echo "--> Installing RPMs..." export YUM0=$PWD/yum_repo_qubes -yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$(pwd)/mnt @qubes-vm +yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$(pwd)/mnt @qubes-vm || RETCODE=1 echo "--> Installing 3rd party apps" -$SCRIPTSDIR/add_3rd_party_software.sh +$SCRIPTSDIR/add_3rd_party_software.sh || RETCODE=1 umount $PWD/mnt/proc + +exit $RETCODE diff --git a/scripts_fedora/add_3rd_party_software.sh b/scripts_fedora/add_3rd_party_software.sh index 712f928..fce6757 100755 --- a/scripts_fedora/add_3rd_party_software.sh +++ b/scripts_fedora/add_3rd_party_software.sh @@ -2,6 +2,6 @@ INSTALLDIR=$PWD/mnt -rpm -i --root=$INSTALLDIR $SCRIPTSDIR/3rd_party_software/adobe-release-x86_64-*.noarch.rpm +rpm -i --root=$INSTALLDIR $SCRIPTSDIR/3rd_party_software/adobe-release-x86_64-*.noarch.rpm || exit 1 rpm --import --root=$INSTALLDIR mnt/etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux -yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR flash-plugin +yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR flash-plugin || exit 1