summaryrefslogtreecommitdiffstats
path: root/release/i386
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2014-10-02 18:20:01 +0000
committergjb <gjb@FreeBSD.org>2014-10-02 18:20:01 +0000
commitc932f99a7aec16e93d90981e5669169a8eaa1ff8 (patch)
tree56fad205b21528ba8a4a7fbd764002977a340932 /release/i386
parent17d149e272ca76d27e3b160a26f291549ad2c2d8 (diff)
downloadFreeBSD-src-c932f99a7aec16e93d90981e5669169a8eaa1ff8.zip
FreeBSD-src-c932f99a7aec16e93d90981e5669169a8eaa1ff8.tar.gz
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
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 6ee1482..30163e7 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
OpenPOWER on IntegriCloud