From 9afb667cf4dd13bb70fc24b481fc667699230da3 Mon Sep 17 00:00:00 2001 From: Ivan Mikushin Date: Mon, 13 Jun 2016 14:30:21 -0700 Subject: [PATCH] Fix building the iso --- scripts/package-installer | 5 +++-- scripts/package-iso | 5 +++-- scripts/package-rootfs | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/package-installer b/scripts/package-installer index 9715718d..d8a11753 100755 --- a/scripts/package-installer +++ b/scripts/package-installer @@ -7,8 +7,9 @@ source ./scripts/version DOCKERFILE=./scripts/installer/Dockerfile.${ARCH} -if [ ! -e $DOCKERFILE ] || [ ! -e dist/artifacts/vmlinuz ]; then - exit 0 +if [ ! -f $DOCKERFILE ] || [ ! -f dist/artifacts/vmlinuz ] || [ ! -f dist/artifacts/initrd ]; then + echo "Error: ${DOCKERFILE}, dist/artifacts/vmlinuz or dist/artifacts/initrd is missing" + exit 1 fi mkdir -p ./scripts/installer/build diff --git a/scripts/package-iso b/scripts/package-iso index 0c1df7ed..3eaff7b5 100755 --- a/scripts/package-iso +++ b/scripts/package-iso @@ -10,8 +10,9 @@ CD=${BUILD}/cd mkdir -p ${CD}/boot/isolinux mkdir -p ${CD}/boot/isolinux -if [ ! -x ${ARTIFACTS}/vmlinuz ]; then - exit 0 +if [ ! -f ${ARTIFACTS}/vmlinuz ] || [ ! -f ${ARTIFACTS}/initrd ]; then + echo "Error: vmlinuz or initrd is missing in ${ARTIFACTS}/" + exit 1 fi cp ${ARTIFACTS}/initrd ${CD}/boot diff --git a/scripts/package-rootfs b/scripts/package-rootfs index 639a688d..68c10c3c 100755 --- a/scripts/package-rootfs +++ b/scripts/package-rootfs @@ -17,7 +17,7 @@ mkdir -p ${ARTIFACTS} ${PREPOP_DIR} if [ "$(docker info | grep 'Storage Driver: ' | sed 's/Storage Driver: //')" != "overlay" ]; then echo Overlay storage driver is require do create rootfs.tar 1>&2 - exit 0 + exit 1 fi DFS=$(docker run -d --privileged -v /lib/modules/$(uname -r):/lib/modules/$(uname -r) ${DFS_IMAGE}${SUFFIX} ${DFS_ARGS})