diff --git a/fedorize_image b/fedorize_image index 96ba58e..35c82c3 100755 --- a/fedorize_image +++ b/fedorize_image @@ -3,6 +3,8 @@ IMG=$1 PKGLISTFILE=$2 +RETCODE=0 + : ${DIST=fc14} if ! [ $# -eq 2 ]; then @@ -38,7 +40,7 @@ else rpm --import --root=$INSTALLDIR keys/* echo "-> Installing core RPM packages..." - rpm -i --root=$INSTALLDIR base_rpms/*.rpm + rpm -i --root=$INSTALLDIR base_rpms/*.rpm || exit 1 cp clean_images/network $INSTALLDIR/etc/sysconfig cp clean_images/resolv.conf $INSTALLDIR/etc @@ -48,6 +50,8 @@ fi mount -t proc proc mnt/proc PKGGROUPS=$(cat $PKGLISTFILE) echo "-> Installing package groups..." -yum install -y --installroot=$INSTALLDIR $PKGGROUPS +yum install -y --installroot=$INSTALLDIR $PKGGROUPS || RETCODE=1 umount mnt/proc mnt + +exit $RETCODE diff --git a/qubeize_image b/qubeize_image index 2e68f61..41a1c49 100755 --- a/qubeize_image +++ b/qubeize_image @@ -3,6 +3,8 @@ CLEANIMG=$1 NAME=$2 +set -e + if [ $# -eq 0 ]; then echo "usage $0 " exit