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_LINUX}" != "true" ]
16 echo "I: linux disabled in /etc/default/extlinux: Skipping ${_EXTLINUX_DIRECTORY}/linux.cfg"
20 if ! ls /boot
/vmlinuz
* 2>&1
22 echo "I: /boot/vmlinuz* - No such files: Skipping ${_EXTLINUX_DIRECTORY}/linux.cfg"
28 ## ${_EXTLINUX_DIRECTORY}/linux.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 vmlinuz-* | grep -v .dpkg-tmp | sed -e 's|vmlinuz-||g' | sort -Vr)"
42 for _VERSION
in ${_VERSIONS}
44 echo "P: Writing config for /boot/vmlinuz-${_VERSION}..."
46 _NUMBER
="${_NUMBER:-0}"
49 if [ -e /boot
/initrd.img-
${_VERSION} ]
51 _INITRD
="initrd=${_BOOT_DIRECTORY}/initrd.img-${_VERSION}"
56 if echo ${EXTLINUX_ALTERNATIVES} |
grep -q default
58 # Writing default entry
62 menu label ${EXTLINUX_MENU_LABEL} ${_VERSION}"
64 if [ "${EXTLINUX_DEFAULT}" = "l${_NUMBER}" ]
71 linux ${_BOOT_DIRECTORY}/vmlinuz-${_VERSION}
72 append ${_INITRD} ${EXTLINUX_ROOT} ${EXTLINUX_PARAMETERS}"
75 if echo ${EXTLINUX_ALTERNATIVES} |
grep -q live
81 menu label ${EXTLINUX_MENU_LABEL} ${_VERSION} (live mode)"
83 if [ "${EXTLINUX_DEFAULT}" = "l${_NUMBER}l" ]
90 linux ${_BOOT_DIRECTORY}/vmlinuz-${_VERSION}
91 append ${_INITRD} ${EXTLINUX_ROOT} ${EXTLINUX_PARAMETERS} boot=live plainroot
93 This option boots the system into live mode (non-persistent)
97 if echo ${EXTLINUX_ALTERNATIVES} |
grep -q recovery
99 # Writing recovery entry
103 menu label ${EXTLINUX_MENU_LABEL} ${_VERSION} (recovery mode)"
105 if [ "${EXTLINUX_DEFAULT}" = "l${_NUMBER}r" ]
112 linux ${_BOOT_DIRECTORY}/vmlinuz-${_VERSION}
113 append ${_INITRD} ${EXTLINUX_ROOT} $(echo ${EXTLINUX_PARAMETERS} | sed -e 's| quiet||') single
115 This option boots the system into recovery mode (single-user)
119 _NUMBER
="$((${_NUMBER} + 1))"
121 if [ "${EXTLINUX_ENTRIES}" = "${_ENTRY}" ]
129 Update
"${_EXTLINUX_DIRECTORY}/linux.cfg" "${_CONFIG}"