aboutsummaryrefslogtreecommitdiff
path: root/release/i386
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-10-02 18:20:01 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-10-02 18:20:01 +0000
commitd04dbaf8281bc192c27ca5b4f8a4c92099f337f4 (patch)
tree56fad205b21528ba8a4a7fbd764002977a340932 /release/i386
parent698271d877673f7a80d4a257e201289a40f9d7dc (diff)
downloadsrc-d04dbaf8281bc192c27ca5b4f8a4c92099f337f4.tar.gz
src-d04dbaf8281bc192c27ca5b4f8a4c92099f337f4.zip
Remove the first argument to panic(), which was initially
intended to be the exit code, however when a non-zero exit code was returned to release/Makefile, this would prevent any remaining (and possibly successful) stages from being attempted. Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/projects/release-vmimage/; revision=272436
Diffstat (limited to 'release/i386')
-rwxr-xr-xrelease/i386/mk-vmimage.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/release/i386/mk-vmimage.sh b/release/i386/mk-vmimage.sh
index 6ee148248cd5..30163e7e3895 100755
--- a/release/i386/mk-vmimage.sh
+++ b/release/i386/mk-vmimage.sh
@@ -58,8 +58,6 @@ usage() {
}
panic() {
- rc="${1}"
- shift 1
msg="${@}"
printf "${msg}\n"
if [ ! -z "${mddev}" ]; then
@@ -67,7 +65,7 @@ panic() {
fi
# Do not allow one failure case to chain through any remaining image
# builds.
- exit 0
+ return 1
}
vm_create_baseimage() {
@@ -96,7 +94,7 @@ vm_create_baseimage() {
cd ${WORLDDIR} && \
make DESTDIR=${DESTDIR} \
installworld installkernel distribution || \
- panic 1 "\n\nCannot install the base system to ${DESTDIR}."
+ panic "\n\nCannot install the base system to ${DESTDIR}."
chroot ${DESTDIR} /usr/bin/newaliases
echo '# Custom /etc/fstab for FreeBSD VM images' \
> ${DESTDIR}/etc/fstab
@@ -111,7 +109,7 @@ vm_create_baseimage() {
# This should never happen. But, it has happened.
msg="Cannot umount(8) ${DESTDIR}\n"
msg="${msg}Something has gone horribly wrong."
- panic 1 "${msg}"
+ panic "${msg}"
fi
sleep 1
done
@@ -141,11 +139,11 @@ vm_create_vmdisk() {
if [ -z "${mkimg_version}" ]; then
msg="Cannot determine mkimg(1) version.\n"
msg="${msg}Cannot continue without a known mkimg(1) version."
- panic 0 "${msg}"
+ panic "${msg}"
fi
if ! mkimg --formats 2>/dev/null | grep -q ${FORMAT}; then
- panic 0 "'${FORMAT}' is not supported by this mkimg(1).\n"
+ panic "'${FORMAT}' is not supported by this mkimg(1).\n"
fi
case ${FORMAT} in