From 75e282959f2cd3c31f2c56b1771c63c1308a89d9 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 29 Feb 2016 16:27:16 -0300 Subject: Make it possible to chose custom default-config package on customize_stagearea_for_image() --- tools/builder_common.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'tools/builder_common.sh') diff --git a/tools/builder_common.sh b/tools/builder_common.sh index 2abf0b7..1de516e 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -1173,6 +1173,19 @@ create_final_staging_area() { customize_stagearea_for_image() { local _image_type="$1" + local _default_config="" + + if [ -n "$2" ]; then + _default_config="$2" + elif [ "${_image_type}" = "nanobsd" -o \ + "${_image_type}" = "memstickserial" -o \ + "${_image_type}" = "memstickadi" ]; then + _default_config="default-config-serial" + elif [ "${_image_type}" = "ova" ]; then + _default_config="default-config-vmware" + else + _default_config="default-config" + fi # Prepare final stage area create_final_staging_area @@ -1211,15 +1224,7 @@ customize_stagearea_for_image() { cp ${CORE_PKG_REAL_PATH}/All/*default-config*.txz ${FINAL_CHROOT_DIR}/pkgs fi - if [ "${_image_type}" = "nanobsd" -o \ - "${_image_type}" = "memstickserial" -o \ - "${_image_type}" = "memstickadi" ]; then - pkg_chroot_add ${FINAL_CHROOT_DIR} default-config-serial - elif [ "${_image_type}" = "ova" ]; then - pkg_chroot_add ${FINAL_CHROOT_DIR} default-config-vmware - else - pkg_chroot_add ${FINAL_CHROOT_DIR} default-config - fi + pkg_chroot_add ${FINAL_CHROOT_DIR} ${_default_config} } create_distribution_tarball() { -- cgit v1.1