Revert grub-file usage in grub-mkconfig.

This commit is contained in:
Vladimir Serbinenko committed 2013-12-24 17:47:27 +01:00
1 parent e5fa26e573
commit faf4a65e1e
12 files changed
+97 -181

No files matched your search

+3 -12
View File
@@ -26,28 +26,18 @@ export TEXTDOMAINDIR="@localedir@"
. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
if [ x$GRUB_PLATFORM != xx86 ]; then
exit 0
fi
osx_entry() {
if [ x$2 = x32 ]; then
# TRANSLATORS: it refers to kernel architecture (32-bit)
bitstr="$(gettext "(32-bit)")"
if ! [ -f "$GRUB_ROOT"/mach_kernel ] || ! "${grub_file}" --is-i386-xnu "$GRUB_ROOT"/mach_kernel; then
return;
fi
else
# TRANSLATORS: it refers to kernel architecture (64-bit)
bitstr="$(gettext "(64-bit)")"
if ! [ -f "$GRUB_ROOT"/mach_kernel ] || ! "${grub_file}" --is-x86_64-xnu "$GRUB_ROOT"/mach_kernel; then
return;
fi
fi
# TRANSLATORS: it refers on the OS residing on device %s
onstr="$(gettext_printf "(on %s)" "${GRUB_DEVICE}")"
cat << EOF
menuentry '$(echo "Darwin/Mac OS X $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'xnu-$2-$(grub_get_device_id "${GRUB_DEVICE}")' {
menuentry '$(echo "Darwin/Mac OS X $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${GRUB_DEVICE}")' {
EOF
save_default_entry | grub_add_tab
prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab
@@ -60,7 +50,7 @@ EOF
fi
fi
if [ \$do_resume = 0 ]; then
xnu_uuid ${GRUB_DEVICE_UUID} uuid
xnu_uuid ${OSXUUID} uuid
if [ -f /Extra/DSDT.aml ]; then
acpi -e /Extra/DSDT.aml
fi
@@ -100,5 +90,6 @@ EOF
EOF
}
OSXUUID="`${grub_probe} --target=fs_uuid --device ${GRUB_DEVICE} 2> /dev/null`"
osx_entry xnu_kernel 32
osx_entry xnu_kernel64 64