create_legacy_bootloader_templates.sh: Support GRUB 2.00

Don't expect grub2-mkimage to exist, since GRUB 2.00 normally installs
grub-mkimage just like GRUB 1.97.  Instead, check for a module that only
exists in GRUB 2.00.

BUG=None
TEST=Built an image with GRUB 2.00.

Change-Id: I239fd14ae8affcf9d29a3b264bf52b5c9e539007
Reviewed-on: https://gerrit.chromium.org/gerrit/63292
Tested-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Queue: Josh Triplett <josh@joshtriplett.org>
diff --git a/build_library/create_legacy_bootloader_templates.sh b/build_library/create_legacy_bootloader_templates.sh
index 0e7bedb..9da64e9 100755
--- a/build_library/create_legacy_bootloader_templates.sh
+++ b/build_library/create_legacy_bootloader_templates.sh
@@ -157,16 +157,16 @@
   # To cover all of our bases, now populate templated boot support for efi.
   sudo mkdir -p "${FLAGS_to}"/efi/boot
 
-  if [[ -f /bin/grub2-mkimage ]];then
+  if [[ -f /lib64/grub/x86_64-efi/search_fs_uuid.mod ]];then
     # Use the newer grub2 1.99+
     grub_args=(
       -p /efi/boot
       part_gpt gptpriority test fat ext2 hfs hfsplus normal boot chain
       configfile linux
     )
-    sudo grub2-mkimage -O x86_64-efi \
+    sudo grub-mkimage -O x86_64-efi \
       -o "${FLAGS_to}/efi/boot/bootx64.efi" "${grub_args[@]}"
-    sudo i386-grub2-mkimage -O i386-efi \
+    sudo i386-grub-mkimage -O i386-efi \
       -o "${FLAGS_to}/efi/boot/bootia32.efi" "${grub_args[@]}"
   else
     # Remove this else case after a few weeks (sometime in Dec 2011)