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 .
/etc
/default
/extlinux
16 if ! ls /boot
/vmlinuz
* 2>&1
18 echo "I: /boot/vmlinuz* - No such files: Skipping ${_EXTLINUX_DIRECTORY}/linux.cfg"
24 ## ${_EXTLINUX_DIRECTORY}/linux.cfg
28 ## The configuration of this file is generated automatically.
29 ## Do not edit this file manually, use: extlinux-update
35 _VERSIONS
="$(cd /boot && ls vmlinuz-* | grep -v .dpkg-tmp | sed -e 's|vmlinuz-||g' | sort -Vr)"
37 if [ "$(stat --printf %d /)" = "$(stat --printf %d /boot)" ]
39 # / and /boot are on the same filesystem
40 _BOOT_DIRECTORY
="/boot"
42 # / and /boot are not on the same filesystem
47 for _VERSION
in ${_VERSIONS}
49 echo "P: Writing config for /boot/vmlinuz-${_VERSION}..."
51 _NUMBER
="${_NUMBER:-0}"
54 if [ -e /boot
/initrd.img-
${_VERSION} ]
56 _INITRD
="initrd=${_BOOT_DIRECTORY}/initrd.img-${_VERSION}"
61 if echo ${EXTLINUX_ALTERNATIVES} |
grep -q default
63 # Writing default entry
67 menu label ${EXTLINUX_MENU_LABEL} ${_VERSION}"
69 if [ "${EXTLINUX_DEFAULT}" = "l${_NUMBER}" ]
76 linux ${_BOOT_DIRECTORY}/vmlinuz-${_VERSION}
77 append ${_INITRD} ${EXTLINUX_ROOT} ${EXTLINUX_PARAMETERS}"
80 if echo ${EXTLINUX_ALTERNATIVES} |
grep -q live
86 menu label ${EXTLINUX_MENU_LABEL} ${_VERSION} (live mode)"
88 if [ "${EXTLINUX_DEFAULT}" = "l${_NUMBER}l" ]
95 linux ${_BOOT_DIRECTORY}/vmlinuz-${_VERSION}
96 append ${_INITRD} ${EXTLINUX_ROOT} ${EXTLINUX_PARAMETERS} boot=live plainroot
98 This option boots the system into live mode (non-persistent)
102 if echo ${EXTLINUX_ALTERNATIVES} |
grep -q recovery
104 # Writing recovery entry
108 menu label ${EXTLINUX_MENU_LABEL} ${_VERSION} (recovery mode)"
110 if [ "${EXTLINUX_DEFAULT}" = "l${_NUMBER}r" ]
117 linux ${_BOOT_DIRECTORY}/vmlinuz-${_VERSION}
118 append ${_INITRD} ${EXTLINUX_ROOT} $(echo ${EXTLINUX_PARAMETERS} | sed -e 's| quiet||') single
120 This option boots the system into recovery mode (single-user)
124 _NUMBER
="$((${_NUMBER} + 1))"
126 if [ "${EXTLINUX_ENTRIES}" = "${_ENTRY}" ]
134 Update
"${_EXTLINUX_DIRECTORY}/linux.cfg" "${_CONFIG}"