From 173fa93f6bd4a0b62ed877431acbb30c8abbd27e Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 27 Aug 2015 11:23:11 -0300 Subject: Move ovf template to templates/ovf, also rename variables accordingly --- tools/builder_common.sh | 16 ++--- tools/builder_defaults.sh | 2 +- tools/conf/ovf/pfSense.ovf | 136 ---------------------------------------- tools/templates/ovf/pfSense.ovf | 136 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 145 insertions(+), 145 deletions(-) delete mode 100644 tools/conf/ovf/pfSense.ovf create mode 100644 tools/templates/ovf/pfSense.ovf (limited to 'tools') diff --git a/tools/builder_common.sh b/tools/builder_common.sh index 21f0de0..514c06b 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -384,7 +384,7 @@ print_flags() { printf " OVABLOCKSIZE: %s\n" $OVABLOCKSIZE printf " OVA_FIRST_PART_SIZE: %s\n" $OVA_FIRST_PART_SIZE printf " OVA_SWAP_PART_SIZE: %s\n" $OVA_SWAP_PART_SIZE - printf " OVFFILE: %s\n" $OVFFILE + printf " OVFTEMPLATE: %s\n" $OVFTEMPLATE printf " OVFVMDK: %s\n" $OVFVMDK printf " OVFCERT: %s\n" $OVFCERT printf " SRC_CONF: %s\n" $SRC_CONF @@ -875,15 +875,15 @@ ova_mount_mnt() { # called from create_ova_image ova_setup_ovf_file() { - if [ -f ${OVFFILE} ]; then - cp ${OVFFILE} ${IMAGES_FINAL_DIR}/${PRODUCT_NAME}.ovf + if [ -f ${OVFTEMPLATE} ]; then + cp ${OVFTEMPLATE} ${IMAGES_FINAL_DIR}/${PRODUCT_NAME}.ovf + else + echo ">>> ERROR: OVF template file (${OVFTEMPLATE}) not found." + print_error_pfS fi - if [ ! -f ${IMAGES_FINAL_DIR}/${PRODUCT_NAME}.ovf ]; then - cp ${BUILDER_TOOLS}/conf/ovf/${PRODUCT_NAME}.ovf ${IMAGES_FINAL_DIR}/${PRODUCT_NAME}.ovf - file_search_replace PRODUCT_VERSION $PRODUCT_VERSION ${IMAGES_FINAL_DIR}/${PRODUCT_NAME}.ovf - file_search_replace PRODUCT_URL $PRODUCT_URL ${IMAGES_FINAL_DIR}/${PRODUCT_NAME}.ovf - fi + file_search_replace PRODUCT_VERSION $PRODUCT_VERSION ${IMAGES_FINAL_DIR}/${PRODUCT_NAME}.ovf + file_search_replace PRODUCT_URL $PRODUCT_URL ${IMAGES_FINAL_DIR}/${PRODUCT_NAME}.ovf } # called from create_ova_image diff --git a/tools/builder_defaults.sh b/tools/builder_defaults.sh index 3996c33..f1b780e 100644 --- a/tools/builder_defaults.sh +++ b/tools/builder_defaults.sh @@ -193,7 +193,7 @@ export MEMORYDISK_SIZE=${MEMORYDISK_SIZE:-"768M"} # OVF/vmdk parms # Name of ovf file included inside OVA archive -export OVFFILE=${OVFFILE:-"${PRODUCT_NAME}.ovf"} +export OVFTEMPLATE=${OVFTEMPLATE:-"${BUILDER_TOOLS}/templates/ovf/${PRODUCT_NAME}.ovf"} # On disk name of VMDK file included in OVA export OVFVMDK=${OVFVMDK:-"${PRODUCT_NAME}.vmdk"} # optional diff --git a/tools/conf/ovf/pfSense.ovf b/tools/conf/ovf/pfSense.ovf deleted file mode 100644 index aeb82d3..0000000 --- a/tools/conf/ovf/pfSense.ovf +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - List of the virtual disks used in the package - - - - The list of logical networks - - The VM Network network - - - - pfSense virtual machine - pfSense - - FreeBSD XX-Bit - FreeBSD XX-Bit (pfSense) - - - Virtual hardware requirements - - Virtual Hardware Family - 0 - pfSense - vmx-07 - - - hertz * 10^6 - Number of Virtual CPUs - 1 virtual CPU(s) - 1 - 3 - 1 - - - byte * 2^20 - Memory Size - 1024MB of memory - 2 - 4 - 1024 - - - 0 - SCSI Controller - scsi0 - 3 - lsilogic - 6 - - - 1 - IDE Controller - VirtualIDEController 1 - 4 - 5 - - - 0 - IDE Controller - VirtualIDEController 0 - 5 - 5 - - - 7 - true - VM Network - E1000 ethernet adapter on "VM Network" - ethernet0 - 6 - E1000 - 10 - - - 8 - true - VM Network - E1000 ethernet adapter on "VM Network" - ethernet0 - 7 - E1000 - 10 - - - 0 - scsi0:0 - ovf:/disk/vmdisk1 - 8 - 3 - 17 - - - - Describes product information for the service - pfSense - Electric Sheep Fencing, LLC - PRODUCT_VERSION - PRODUCT_URL - PRODUCT_URL - - - An annotation - pfSense is a free, open source customized distribution of FreeBSD tailored for use as a firewall and router. In addition to being a powerful, flexible firewalling and routing platform, it includes a long list of related features and a package system allowing further expandability without adding bloat and potential security vulnerabilities to the base distribution. pfSense is a popular project with more than 1 million downloads since its inception, and proven in countless installations ranging from small home networks protecting a PC and an Xbox to large corporations, universities and other organizations protecting thousands of network devices. - - - The End User License Agreement - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - - - diff --git a/tools/templates/ovf/pfSense.ovf b/tools/templates/ovf/pfSense.ovf new file mode 100644 index 0000000..aeb82d3 --- /dev/null +++ b/tools/templates/ovf/pfSense.ovf @@ -0,0 +1,136 @@ + + + + + + + List of the virtual disks used in the package + + + + The list of logical networks + + The VM Network network + + + + pfSense virtual machine + pfSense + + FreeBSD XX-Bit + FreeBSD XX-Bit (pfSense) + + + Virtual hardware requirements + + Virtual Hardware Family + 0 + pfSense + vmx-07 + + + hertz * 10^6 + Number of Virtual CPUs + 1 virtual CPU(s) + 1 + 3 + 1 + + + byte * 2^20 + Memory Size + 1024MB of memory + 2 + 4 + 1024 + + + 0 + SCSI Controller + scsi0 + 3 + lsilogic + 6 + + + 1 + IDE Controller + VirtualIDEController 1 + 4 + 5 + + + 0 + IDE Controller + VirtualIDEController 0 + 5 + 5 + + + 7 + true + VM Network + E1000 ethernet adapter on "VM Network" + ethernet0 + 6 + E1000 + 10 + + + 8 + true + VM Network + E1000 ethernet adapter on "VM Network" + ethernet0 + 7 + E1000 + 10 + + + 0 + scsi0:0 + ovf:/disk/vmdisk1 + 8 + 3 + 17 + + + + Describes product information for the service + pfSense + Electric Sheep Fencing, LLC + PRODUCT_VERSION + PRODUCT_URL + PRODUCT_URL + + + An annotation + pfSense is a free, open source customized distribution of FreeBSD tailored for use as a firewall and router. In addition to being a powerful, flexible firewalling and routing platform, it includes a long list of related features and a package system allowing further expandability without adding bloat and potential security vulnerabilities to the base distribution. pfSense is a popular project with more than 1 million downloads since its inception, and proven in countless installations ranging from small home networks protecting a PC and an Xbox to large corporations, universities and other organizations protecting thousands of network devices. + + + The End User License Agreement + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + + + -- cgit v1.1