diff options
author | Renato Botelho <renato@netgate.com> | 2016-02-29 16:23:21 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-02-29 16:23:21 -0300 |
commit | b2fbacdc38429ccbfc8df89f5bd56370881ebac8 (patch) | |
tree | 15e559cae1f1b7153092a7e9c415de53982c8ed9 | |
parent | 191136b34a00ac3e6b43302eabd9e713ac020e87 (diff) | |
download | pfsense-b2fbacdc38429ccbfc8df89f5bd56370881ebac8.zip pfsense-b2fbacdc38429ccbfc8df89f5bd56370881ebac8.tar.gz |
Save parameter in local variable
-rw-r--r-- | tools/builder_common.sh | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh index 16dbf62..2abf0b7 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -1172,13 +1172,15 @@ create_final_staging_area() { } customize_stagearea_for_image() { + local _image_type="$1" + # Prepare final stage area create_final_staging_area pkg_chroot_add ${FINAL_CHROOT_DIR} rc - if [ "${1}" = "nanobsd" -o \ - "${1}" = "nanobsd-vga" ]; then + if [ "${_image_type}" = "nanobsd" -o \ + "${_image_type}" = "nanobsd-vga" ]; then mkdir -p ${FINAL_CHROOT_DIR}/root/var/db \ ${FINAL_CHROOT_DIR}/root/var/cache \ @@ -1200,20 +1202,20 @@ customize_stagearea_for_image() { pkg_chroot_add ${FINAL_CHROOT_DIR} repo-devel fi - if [ "${1}" = "iso" -o \ - "${1}" = "memstick" -o \ - "${1}" = "memstickserial" -o \ - "${1}" = "memstickadi" ]; then + if [ "${_image_type}" = "iso" -o \ + "${_image_type}" = "memstick" -o \ + "${_image_type}" = "memstickserial" -o \ + "${_image_type}" = "memstickadi" ]; then install_bsdinstaller mkdir -p ${FINAL_CHROOT_DIR}/pkgs cp ${CORE_PKG_REAL_PATH}/All/*default-config*.txz ${FINAL_CHROOT_DIR}/pkgs fi - if [ "${1}" = "nanobsd" -o \ - "${1}" = "memstickserial" -o \ - "${1}" = "memstickadi" ]; then + if [ "${_image_type}" = "nanobsd" -o \ + "${_image_type}" = "memstickserial" -o \ + "${_image_type}" = "memstickadi" ]; then pkg_chroot_add ${FINAL_CHROOT_DIR} default-config-serial - elif [ "${1}" = "ova" ]; then + elif [ "${_image_type}" = "ova" ]; then pkg_chroot_add ${FINAL_CHROOT_DIR} default-config-vmware else pkg_chroot_add ${FINAL_CHROOT_DIR} default-config |