fedora: Improve error handling
This commit is contained in:
parent
8cf31bb390
commit
26663e2a58
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user