# Created by Tobias Powalowski <tpowa@archlinux.org>

install ()
{
    ### generate boot.msg
    [ "${RUNPROGRAM}" = "mkisolinux" ] && TITLEMSG="ISOLINUX"
    [ "${RUNPROGRAM}" = "mksyslinux" ] && TITLEMSG="SYSLINUX"
    [ "${RUNPROGRAM}" = "mkpxelinux" ] && TITLEMSG="PXELINUX"
    # change to english locale!
    export LANG=en_US
    CONFIGMSG="INSTALLATION / RESCUEBOOT SYSTEM"
    NAME=${ARCHVERSION}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "Arch Linux" >> ${BOOTMESSAGE}
    echo "http://www.archlinux.org" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "${TITLEMSG} BOOT" >> ${BOOTMESSAGE}
    echo "Creation Tool: '$(echo ${RUNPROGRAM})' written by Tobias Powalowski <tpowa@archlinux.org>" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    echo "${CONFIGMSG}" >> ${BOOTMESSAGE} 
    echo "Arch Linux ${NAME}" >> ${BOOTMESSAGE}
    echo "Kernel: ${USEKERNEL}" >> ${BOOTMESSAGE}
    echo "Architecture: $(uname -m)" >> ${BOOTMESSAGE}
    echo "Creation Date: $(date)" >> ${BOOTMESSAGE}
    echo "" >> ${BOOTMESSAGE}
    [ -s "${APPENDBOOTMESSAGE}" ] && cat ${APPENDBOOTMESSAGE} >> ${BOOTMESSAGE}
    [ -s "${APPENDOPTIONSBOOTMESSAGE}" ] && cat ${APPENDOPTIONSBOOTMESSAGE} >> ${OPTIONSBOOTMESSAGE}
}

help ()
{
cat <<HELPEOF
  This hook sets up dynamically the boot message, depending on
  your system.
HELPEOF
}