* util/grub-mkconfig_lib.in (grub_tab): New variable.
(grub_add_tab): New function. * util/grub.d/10_hurd.in: Replace \t with $grub_tab orgrub_add_tab. * util/grub.d/10_illumos.in: Likewise. * util/grub.d/10_kfreebsd.in: Likewise. * util/grub.d/10_linux.in: Likewise. * util/grub.d/10_netbsd.in: Likewise. * util/grub.d/10_windows.in: Likewise. * util/grub.d/10_xnu.in: Likewise. * util/grub.d/20_linux_xen.in: Likewise. * util/grub.d/30_os-prober.in: Likewise.
This commit is contained in:
parent
7ddffdadea
commit
140acd3c83
11 changed files with 58 additions and 37 deletions
|
@ -54,8 +54,8 @@ osx_entry() {
|
|||
cat << EOF
|
||||
menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")' {
|
||||
EOF
|
||||
save_default_entry | sed -e "s/^/\t/"
|
||||
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
|
||||
save_default_entry | grub_add_tab
|
||||
prepare_grub_to_access_device ${DEVICE} | grub_add_tab
|
||||
cat << EOF
|
||||
load_video
|
||||
set do_resume=0
|
||||
|
@ -126,8 +126,8 @@ for OS in ${OSPROBED} ; do
|
|||
cat << EOF
|
||||
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
|
||||
EOF
|
||||
save_default_entry | sed -e "s/^/\t/"
|
||||
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
|
||||
save_default_entry | grub_add_tab
|
||||
prepare_grub_to_access_device ${DEVICE} | grub_add_tab
|
||||
|
||||
case ${LONGNAME} in
|
||||
Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
|
||||
|
@ -181,14 +181,14 @@ EOF
|
|||
used_osprober_linux_ids="$used_osprober_linux_ids 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'"
|
||||
|
||||
if [ -z "${prepare_boot_cache}" ]; then
|
||||
prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
|
||||
prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | grub_add_tab)"
|
||||
fi
|
||||
|
||||
if [ "x$is_first_entry" = xtrue ]; then
|
||||
cat << EOF
|
||||
menuentry '$(echo "$OS" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
|
||||
EOF
|
||||
save_default_entry | sed -e "s/^/\t/"
|
||||
save_default_entry | grub_add_tab
|
||||
printf '%s\n' "${prepare_boot_cache}"
|
||||
cat << EOF
|
||||
linux ${LKERNEL} ${LPARAMS}
|
||||
|
@ -208,8 +208,8 @@ EOF
|
|||
cat << EOF
|
||||
menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' {
|
||||
EOF
|
||||
save_default_entry | sed -e "s/^/\t\t/"
|
||||
printf '%s\n' "${prepare_boot_cache}" | sed -e "s/^/\t/"
|
||||
save_default_entry | sed -e "s/^/$grub_tab$grub_tab/"
|
||||
printf '%s\n' "${prepare_boot_cache}" | grub_add_tab
|
||||
cat << EOF
|
||||
linux ${LKERNEL} ${LPARAMS}
|
||||
EOF
|
||||
|
@ -243,8 +243,8 @@ EOF
|
|||
cat << EOF
|
||||
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' {
|
||||
EOF
|
||||
save_default_entry | sed -e "s/^/\t/"
|
||||
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
|
||||
save_default_entry | grub_add_tab
|
||||
prepare_grub_to_access_device ${DEVICE} | grub_add_tab
|
||||
grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
|
||||
mach_device="`echo "${grub_device}" | sed -e 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`"
|
||||
grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue