diff --git a/ezjail-admin b/ezjail-admin index 4acb4c2..15c2a70 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -223,10 +223,20 @@ update) echo "Cannot find your copy of the FreeBSD source tree in $ezjail_sourcetree."; exit 1; fi + if [ ! -f ${ezjail_sourcetree}/Makefile ]; then + echo "Your source tree in $ezjail_sourcetree seems to be incomplete (Makefile missing)."; exit 1; + fi + cd ${ezjail_sourcetree} rm -rf ${ezjail_jailfull}; mkdir -p ${ezjail_jailfull} make ${updatejail_installaction} DESTDIR=${ezjail_jailfull} + if [ $? != 0 ]; then + echo "make ${updatejail_installaction} failed"; exit 1; + fi make distribution DESTDIR=${ezjail_jailfull} + if [ $? != 0 ]; then + echo "make distribution failed"; exit 1; + fi cd ${ezjail_jailfull} mkdir -p ${ezjail_jailbase}/usr ${ezjail_jailbase}/config/pkg