fedora: Improve error handling

This commit is contained in:
Marek Marczykowski-Górecki 2014-05-13 04:30:01 +02:00
parent 8cf31bb390
commit 26663e2a58
3 changed files with 6 additions and 2 deletions

View File

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

View File

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

View File

@ -10,7 +10,7 @@ fi
export PKGGROUPS=$(cat $PKGLISTFILE) export PKGGROUPS=$(cat $PKGLISTFILE)
export YUM0=$PWD/yum_repo_qubes 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 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 yum update -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR || RETCODE=1