Skip to content
Browse files

Fix an issue with warden creating templates and not returning the

proper exit status.

While here also fix URL we pull FreeBSD distfiles from
  • Loading branch information...
1 parent 81bc3fc commit 228303dba59c91b6f604a65efb1d8a8a337ae477 @kmoore134 kmoore134 committed
Showing with 4 additions and 4 deletions.
  1. +1 −1 src-sh/warden/bin/warden
  2. +3 −3 src-sh/warden/scripts/backend/createtemplate.sh
View
2 src-sh/warden/bin/warden
@@ -758,7 +758,7 @@ template) require_root
shift
done
export TPLUGJAIL TNICK FBSDTAR FBSDARCH TRUEOSVER FBSDVER
- ${PROGDIR}/scripts/backend/createtemplate.sh ;;
+ ${PROGDIR}/scripts/backend/createtemplate.sh ; exit $? ;;
delete) delete_template "$3" ;;
list) list_templates ;;
*) help_template ; exit 1 ;;
View
6 src-sh/warden/scripts/backend/createtemplate.sh
@@ -33,10 +33,10 @@ download_template_files() {
found=0
for f in $DFILES
do
- fetch -o "${JDIR}/.download/$f" "ftp://ftp.freebsd.org/pub/FreeBSD/releases/${FBSDARCH}/${FBSDVER}/$f"
+ fetch -o "${JDIR}/.download/$f" "ftp://ftp.freebsd.org/pub/FreeBSD/releases/${FBSDARCH}/${FBSDARCH}/${FBSDVER}/$f"
if [ $? -ne 0 ] ; then
echo "Trying ftp-archive..."
- fetch -o "${JDIR}/.download/$f" "http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/${FBSDARCH}/${FBSDVER}/$f"
+ fetch -o "${JDIR}/.download/$f" "http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/${FBSDARCH}/${FBSDARCH}/${FBSDVER}/$f"
if [ $? -ne 0 ] ; then found=1 ; break; fi
fi
done
@@ -207,7 +207,7 @@ fi
# Check if we are on REAL old versions of FreeBSD
if [ -n "$FBSDVER" ] ; then
- mV=`echo $FBSDVER | cut -d '.' -f 1`
+ mV=`echo $FBSDVER | cut -d '-' -f 1 | cut -d '.' -f 1`
if [ $mV -lt 9 ] ; then
oldFBSD="YES"
oldStr="base"

0 comments on commit 228303d

Please sign in to comment.
Something went wrong with that request. Please try again.