From 638f5f7ea1758160f4b79a0301d25b7c02c604c2 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 11 Sep 2010 16:37:00 +0200 Subject: [PATCH] Implement --bootloader-id --- util/grub-install.in | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/util/grub-install.in b/util/grub-install.in index eb7ef48b6..5b49adcf8 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -61,6 +61,16 @@ efibootmgr=`which efibootmgr 2>/dev/null || true` removable=no efi_quiet= +# Get GRUB_DISTRIBUTOR. +if test -f ${sysconfdir}/default/grub ; then + . ${sysconfdir}/default/grub +fi + +bootloader_id="$(echo "$GRUB_DISTRIBUTOR" | tr '[A-Z]' '[a-z]' | cut -d' ' -f1)" +if test -z "$bootloader_id"; then + bootloader_id=grub +fi + if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then disk_module=biosdisk elif [ "${platform}" = "ieee1275" ] || [ "${platform}" = "efi" ] ; then @@ -111,6 +121,7 @@ fi if [ "${platform}" = "efi" ]; then cat <