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 # Checking extlinux directory
15 echo -n "P: Checking for EXTLINUX directory..."
17 # Creating extlinux directory
18 if [ ! -e "${_EXTLINUX_DIRECTORY}" ]
22 echo -n "P: Creating EXTLINUX directory..."
23 mkdir
-p "${_EXTLINUX_DIRECTORY}"
24 echo " done: ${_EXTLINUX_DIRECTORY}"
30 EXTLINUX_ALTERNATIVES
="${EXTLINUX_ALTERNATIVES:-default recovery}"
31 EXTLINUX_DEFAULT
="${EXTLINUX_DEFAULT:-l0}"
32 EXTLINUX_ENTRIES
="${EXTLINUX_ENTRIES:-all}"
33 EXTLINUX_MEMDISK
="${EXTLINUX_MEMDISK:-true}"
34 EXTLINUX_MEMDISK_DIRECTORY
="${EXTLINXU_MEMDISK_DIRECTORY:-/boot}"
36 if [ -z "${EXTLINUX_MENU_LABEL}" ]
38 if [ -x "$(which lsb_release 2>/dev/null)" ]
40 EXTLINUX_MENU_LABEL
="$(lsb_release -i -s) GNU/Linux, kernel"
42 EXTLINUX_MENU_LABEL
="Debian GNU/Linux, kernel"
46 EXTLINUX_OS_PROBER
="${EXTLINUX_OS_PROBER:-true}"
47 EXTLINUX_PARAMETERS
="${EXTLINUX_PARAMETERS:-ro quiet}"
49 if [ -z "${EXTLINUX_ROOT}" ]
55 read _FS_SPEC _FS_FILE _FS_VFSTYPE _FS_MNTOPS _FS_FREQ _FS_PASSNO
<< EOF
59 if [ "${_FS_SPEC}" != "#" ] && [ "${_FS_FILE}" = "/" ]
61 EXTLINUX_ROOT
="root=${_FS_SPEC}"
67 if [ -z "${EXTLINUX_THEME}" ]
69 # Using default menu if available
70 if [ -e /usr
/share
/EXTLINUX
/themes
/default
]
72 EXTLINUX_THEME
="default"
78 EXTLINUX_TIMEOUT
="${EXTLINUX_TIMEOUT:-50}"
80 # Writing new default file
81 cat > "/etc/default/extlinux" << EOF
82 ## /etc/default/extlinux - configuration file for extlinux-update(8)
83 # This file is rewritten by a script. Any comments and unsuported options will be lost.
85 EXTLINUX_UPDATE="${EXTLINUX_UPDATE}"
87 EXTLINUX_ALTERNATIVES="${EXTLINUX_ALTERNATIVES}"
88 EXTLINUX_DEFAULT="${EXTLINUX_DEFAULT}"
89 EXTLINUX_ENTRIES="${EXTLINUX_ENTRIES}"
90 EXTLINUX_MEMDISK="${EXTLINUX_MEMDISK}"
91 EXTLINUX_MEMDISK_DIRECTORY="${EXTLINUX_MEMDISK_DIRECTORY}"
92 EXTLINUX_MENU_LABEL="${EXTLINUX_MENU_LABEL}"
93 EXTLINUX_OS_PROBER="${EXTLINUX_OS_PROBER}"
94 EXTLINUX_PARAMETERS="$(echo -n ${EXTLINUX_PARAMETERS} | sed -e 's|\"|\\\"|g')"
95 EXTLINUX_ROOT="${EXTLINUX_ROOT}"
96 EXTLINUX_THEME="${EXTLINUX_THEME}"
97 EXTLINUX_TIMEOUT="${EXTLINUX_TIMEOUT}"