3 ## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
12 .
/usr
/share
/extlinux
/extlinux-update.sh
14 if [ "${EXTLINUX_MEMTEST}" != "true" ]
16 echo "I: memtest disabled in /etc/default/extlinux: Skipping ${_EXTLINUX_DIRECTORY}/memtest.cfg"
20 if ! ls /boot
/memtest
*.bin
2>&1
22 echo "I: /boot/memtest*.bin - No such files: Skipping ${_EXTLINUX_DIRECTORY}/memtest.cfg"
28 ## ${_EXTLINUX_DIRECTORY}/memtest.cfg
32 ## The configuration of this file is generated automatically.
33 ## Do not edit this file manually use: extlinux-update
39 _VERSIONS
="$(cd /boot && ls memtest*.bin | grep -v .dpkg-tmp | sed -e 's|^memtest||g' -e 's|[.]bin$||g' | sort -Vr)"
41 for _VERSION
in ${_VERSIONS}
43 if echo "${_VERSION}" |
grep multiboot
> /dev
/null
;
45 echo "W: Memtest /boot/memtest${_VERSION}.bin unsupported..."
48 echo "P: Writing config for /boot/memtest${_VERSION}.bin..."
50 _NUMBER
="${_NUMBER:-0}"
55 menu label ${EXTLINUX_MENU_LABEL} memtest${_VERSION}"
57 if [ "${EXTLINUX_DEFAULT}" = "mt${_NUMBER}" ]
64 linux ${_BOOT_DIRECTORY}/memtest${_VERSION}.bin"
67 _NUMBER
="$((${_NUMBER} + 1))"
68 _ENTRY
="$((${_ENTRY} + 1))"
70 if [ "${EXTLINUX_ENTRIES}" = "${_ENTRY}" ]
78 Update
"${_EXTLINUX_DIRECTORY}/memtest.cfg" "${_CONFIG}"