summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-03-10 13:13:06 -0300
committerRenato Botelho <renato@netgate.com>2016-03-10 13:13:06 -0300
commit35104e0345c476509b64c66857d638712c7700a0 (patch)
treedfa65d79746bd2737668d273a1b8affe764d913e
parent8f58b51b15a37311e10bf36285a239019bc07c22 (diff)
downloadpfsense-35104e0345c476509b64c66857d638712c7700a0.zip
pfsense-35104e0345c476509b64c66857d638712c7700a0.tar.gz
Move internal variable to be local inside function
-rw-r--r--tools/builder_common.sh3
-rw-r--r--tools/builder_defaults.sh2
2 files changed, 3 insertions, 2 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index 24e8fd4..f49cf39 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -845,6 +845,9 @@ create_ova_image() {
mkdir -p ${OVA_TMP}
+ # Calculate real swap size, removing 128 blocks (65536 bytes) beginning/loader
+ local OVA_SWAP_PART_SIZE=$((${OVA_SWAP_PART_SIZE_IN_GB}*1024*1024*1024-65536))
+
# Prepare folder to be put in image
customize_stagearea_for_image "ova"
install_default_kernel ${DEFAULT_KERNEL} "no"
diff --git a/tools/builder_defaults.sh b/tools/builder_defaults.sh
index 2dc9e53..18a7bdf 100644
--- a/tools/builder_defaults.sh
+++ b/tools/builder_defaults.sh
@@ -214,8 +214,6 @@ export VMDK_DISK_CAPACITY_IN_GB=${VMDK_DISK_CAPACITY_IN_GB:-"8"}
export OVA_FIRST_PART_SIZE_IN_GB=${OVA_FIRST_PART_SIZE_IN_GB:-"6"}
# swap partition size (freebsd-swap)
export OVA_SWAP_PART_SIZE_IN_GB=${OVA_SWAP_PART_SIZE_IN_GB:-"2"}
-# Calculate real swap size, removing 128 blocks (65536 bytes) beginning/loader
-export OVA_SWAP_PART_SIZE=$((${OVA_SWAP_PART_SIZE_IN_GB}*1024*1024*1024-65536))
# Temporary place to save files
export OVA_TMP=${OVA_TMP:-"${SCRATCHDIR}/ova_tmp"}
# end of OVF
OpenPOWER on IntegriCloud