From a3296c1c92bc9046434dc150a19b23e1add2d949 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 7 Jul 2015 10:19:01 -0400 Subject: [PATCH] Make %{efidir} dynamically from /etc/os-release Signed-off-by: Peter Jones --- grub2.spec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/grub2.spec b/grub2.spec index af3ee64..0bb59a9 100644 --- a/grub2.spec +++ b/grub2.spec @@ -34,12 +34,8 @@ %global grubeficdname gcdaa64.efi %endif -%if 0%{?rhel} -%global efidir redhat -%endif -%if 0%{?fedora} -%global efidir fedora -%endif +# Figure out the right file path to use +%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/')) %endif