#!/bin/bash # This script do the following: # Download Memtest TFTP_ROOT="/var/lib/tftpboot" # Config file CONFIG_PXE="${TFTP_ROOT}/installer/menu.cfg.diag.example" rm -f ${CONFIG_PXE} && touch ${CONFIG_PXE} ### Memtest {{{ MEMTEST_VERSION="5.01" MEMTEST_URL="http://www.memtest.org/download/${MEMTEST_VERSION}/memtest86+-${MEMTEST_VERSION}.bin.gz" MEMTEST_INSTALLER_DIR="${TFTP_ROOT}/installer/memtest/" # (re)Create the installer directory rm -rf ${MEMTEST_INSTALLER_DIR} mkdir -p ${MEMTEST_INSTALLER_DIR} pushd ${MEMTEST_INSTALLER_DIR} # Download the last version and set simpler name (without the **.bin** extension !) wget ${MEMTEST_URL} -O - | gzip -d > memtest86+-${MEMTEST_VERSION}.bin ln -s memtest86+-${MEMTEST_VERSION}.bin memtest86+ popd # Config file /bin/cat >> "${CONFIG_PXE}" << EOF label memtest menu label ^Memory diagnostic tool (Memtest) kernel installer/memtest/memtest86+ EOF ### }}} exit 0