fedora: improve error handling
Make sure that all partitions got unmounted.
This commit is contained in:
parent
6fcc7ad060
commit
32ed8052bf
@ -48,13 +48,13 @@ export IMG=qubeized_images/$NAME-root.img
|
||||
echo "--> Copying $CLEANIMG to $IMG..."
|
||||
cp $CLEANIMG $IMG || exit 1
|
||||
|
||||
echo "--> Mouting $IMG"
|
||||
echo "--> Mounting $IMG"
|
||||
|
||||
mkdir -p mnt
|
||||
mount -o loop $IMG mnt || exit 1
|
||||
export INSTALLDIR=mnt
|
||||
|
||||
$SCRIPTSDIR/04_install_qubes.sh || exit 1
|
||||
$SCRIPTSDIR/04_install_qubes.sh || { umount $INSTALLDIR; exit 1; }
|
||||
|
||||
echo "--> Copying the Apps Menu shortcuts..."
|
||||
export APPSORIG=qubeized_images/$NAME-apps.orig
|
||||
|
@ -2,12 +2,14 @@
|
||||
echo "--> Preparing environment..."
|
||||
mount -t proc proc $PWD/mnt/proc
|
||||
|
||||
trap "umount $PWD/mnt/proc" EXIT
|
||||
|
||||
export YUM0=$PWD/yum_repo_qubes
|
||||
if [ "$TEMPLATE_FLAVOR" == "minimal" ]; then
|
||||
YUM_OPTS="$YUM_OPTS --group_package_types=mandatory"
|
||||
fi
|
||||
|
||||
echo "--> Installing RPMs..."
|
||||
export YUM0=$PWD/yum_repo_qubes
|
||||
yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$(pwd)/mnt @qubes-vm || RETCODE=1
|
||||
|
||||
rpm --root=$PWD/mnt --import $PWD/mnt/etc/pki/rpm-gpg/RPM-GPG-KEY-qubes-*
|
||||
@ -17,6 +19,4 @@ if [ "$TEMPLATE_FLAVOR" != "minimal" ]; then
|
||||
$SCRIPTSDIR/add_3rd_party_software.sh || RETCODE=1
|
||||
fi
|
||||
|
||||
umount $PWD/mnt/proc
|
||||
|
||||
exit $RETCODE
|
||||
|
Loading…
Reference in New Issue
Block a user