fedora: Improve error handling

pull/1/head
Marek Marczykowski-Górecki 10 years ago
parent 8cf31bb390
commit 26663e2a58

@ -26,6 +26,7 @@ if [ -f $IMG ]; then
echo "-> Image file already exists, assuming *update*..."
mount -o loop $IMG mnt || exit 1
export INSTALLDIR=`pwd`/mnt/
trap "umount $INSTALLDIR" EXIT
else
echo "-> Initializing empty image..."
@ -39,12 +40,15 @@ else
export INSTALLDIR=`pwd`/mnt/
trap "umount $INSTALLDIR" EXIT
$SCRIPTSDIR/01_install_core.sh
fi
echo "-> Installing package groups..."
$SCRIPTSDIR/02_install_groups.sh
trap - EXIT
echo "-> Unmounting prepared_image..."
sudo umount $INSTALLDIR

@ -54,7 +54,7 @@ mkdir -p mnt
mount -o loop $IMG mnt || exit 1
export INSTALLDIR=mnt
$SCRIPTSDIR/04_install_qubes.sh
$SCRIPTSDIR/04_install_qubes.sh || exit 1
echo "--> Copying the Apps Menu shortcuts..."
export APPSORIG=qubeized_images/$NAME-apps.orig

@ -10,7 +10,7 @@ fi
export PKGGROUPS=$(cat $PKGLISTFILE)
export YUM0=$PWD/yum_repo_qubes
yum clean all -c $PWD/yum.conf $YUM_OPTS -y --installroot=$PWD/mnt
yum clean all -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR
yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR $PKGGROUPS || RETCODE=1
yum update -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR || RETCODE=1

Loading…
Cancel
Save