diff options
author | Renato Botelho <renato@netgate.com> | 2017-02-02 18:27:17 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-02 18:32:36 -0200 |
commit | b17d47b67f73ed0cccc0edbdd9c9548522ba2e40 (patch) | |
tree | 133fddf67ee5411cf4304fed85cb3265dfabd876 /tools | |
parent | 186c7a6ca49af0d848c1082bfd7f6d9f0cde7046 (diff) | |
download | pfsense-b17d47b67f73ed0cccc0edbdd9c9548522ba2e40.zip pfsense-b17d47b67f73ed0cccc0edbdd9c9548522ba2e40.tar.gz |
Allow to build variant ISO image as done for memstick
Diffstat (limited to 'tools')
-rw-r--r-- | tools/builder_common.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh index d76107e..f7abe1d 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -721,6 +721,8 @@ create_distribution_tarball() { } create_iso_image() { + local _variant="$1" + LOGFILE=${BUILDER_LOGS}/isoimage.${TARGET} if [ -z "${ISOPATH}" ]; then @@ -732,7 +734,14 @@ create_iso_image() { mkdir -p $(dirname ${ISOPATH}) - customize_stagearea_for_image "iso" + local _image_path=${ISOPATH} + if [ -n "${_variant}" ]; then + _image_path=$(echo "$_image_path" | \ + sed "s/${PRODUCT_NAME_SUFFIX}-/&${_variant}-/") + VARIANTIMAGES="${VARIANTIMAGES}${VARIANTIMAGES:+ }${_image_path}" + fi + + customize_stagearea_for_image "iso" "" $_variant install_default_kernel ${DEFAULT_KERNEL} BOOTCONF=${INSTALLER_CHROOT_DIR}/boot.config @@ -748,15 +757,15 @@ create_iso_image() { sh ${FREEBSD_SRC_DIR}/release/${TARGET}/mkisoimages.sh -b \ ${FSLABEL} \ - ${ISOPATH} \ + ${_image_path} \ ${INSTALLER_CHROOT_DIR} - if [ ! -f "${ISOPATH}" ]; then + if [ ! -f "${_image_path}" ]; then echo "ERROR! ISO image was not built" print_error_pfS fi - gzip -qf $ISOPATH & + gzip -qf $_image_path & _bg_pids="${_bg_pids}${_bg_pids:+ }$!" echo ">>> ISO created: $(LC_ALL=C date)" | tee -a ${LOGFILE} |