3
# lh_binary_memtest86(1) - installs memtest86+
7
# Source common functions
8
for FUNCTION in /usr/share/live-helper/functions/*.sh
13
# Reading configuration files
14
Read_conffile config/common
15
Read_conffile config/bootstrap
16
Read_conffile config/image
19
# Requiring stage file
20
Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap
23
Check_lockfile "${LIVE_ROOT}"/.lock
26
Create_lockfile "${LIVE_ROOT}"/.lock
29
Check_stagefile "${LIVE_ROOT}"/.stage/binary_memtest86
31
if [ "${LIVE_ARCHITECTURE}" != "amd64" ] && [ "${LIVE_ARCHITECTURE}" != "i386" ]
33
echo "W: skipping binary_memtest86, foreign architecture."
37
if [ "${LIVE_MEMTEST86}" = "enabled" ]
39
if [ ! -f "${LIVE_CHROOT}"/boot/memtest86+.bin ]
41
PACKAGES="${PACKAGES} memtest86+"
44
if [ -n "${PACKAGES}" ]
49
Chroot "apt-get install --yes ${PACKAGES}"
53
Chroot "aptitude install --assume-yes ${PACKAGES}"
58
case "${LIVE_BINARY_IMAGE}" in
60
DESTDIR="${LIVE_ROOT}/binary/isolinux"
64
DESTDIR="${LIVE_ROOT}/tftpboot"
68
DESTDIR="${LIVE_ROOT}/binary"
73
if [ ! -d "${DESTDIR}" ]
78
# Installing memtest86+
79
cp "${LIVE_ROOT}"/chroot/boot/memtest86+.bin "${DESTDIR}"/memtest
81
if [ -n "${PACKAGES}" ]
86
Chroot "apt-get remove --purge --yes ${PACKAGES}"
90
Chroot "aptitude purge --assume-yes ${PACKAGES}"
96
Create_stagefile "${LIVE_ROOT}"/.stage/binary_memtest86