diff options
author | Renato Botelho <renato@netgate.com> | 2016-02-29 16:27:16 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-02-29 16:28:15 -0300 |
commit | 75e282959f2cd3c31f2c56b1771c63c1308a89d9 (patch) | |
tree | b174f43412f49bf6e08275e5ac746407af3fb38f | |
parent | b2fbacdc38429ccbfc8df89f5bd56370881ebac8 (diff) | |
download | pfsense-75e282959f2cd3c31f2c56b1771c63c1308a89d9.zip pfsense-75e282959f2cd3c31f2c56b1771c63c1308a89d9.tar.gz |
Make it possible to chose custom default-config package on customize_stagearea_for_image()
-rw-r--r-- | tools/builder_common.sh | 23 |
1 files changed, 14 insertions, 9 deletions
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() { |