mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Allow to build variant ISO image as done for memstick
This commit is contained in:
parent
186c7a6ca4
commit
b17d47b67f
8
build.sh
8
build.sh
@ -362,7 +362,13 @@ for _IMGTOBUILD in $_IMAGESTOBUILD; do
|
||||
|
||||
case "${_IMGTOBUILD}" in
|
||||
iso)
|
||||
create_iso_image
|
||||
if [ -n "${ISO_VARIANTS}" ]; then
|
||||
for _variant in ${ISO_VARIANTS}; do
|
||||
create_iso_image ${_variant}
|
||||
done
|
||||
else
|
||||
create_iso_image
|
||||
fi
|
||||
;;
|
||||
memstick)
|
||||
if [ -n "${MEMSTICK_VARIANTS}" ]; then
|
||||
|
||||
@ -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}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user