15 |
%define git 9752 |
%define git 9752 |
16 |
Name: grub2 |
Name: grub2 |
17 |
Version: 2.02 |
Version: 2.02 |
18 |
Release: %mkrel -c git%{git} 11 |
Release: %mkrel -c git%{git} 12 |
19 |
Summary: Boot-loader with support for Linux, Multiboot and more |
Summary: Boot-loader with support for Linux, Multiboot and more |
20 |
Group: System/Boot and Init |
Group: System/Boot and Init |
21 |
License: GPLv3+ and GPLv2 |
License: GPLv3+ and GPLv2 |
262 |
%{name}-install --directory=%{_libdir}/grub/%{pc_arch} --grub-setup=/bin/true $BOOT_PARTITION |
%{name}-install --directory=%{_libdir}/grub/%{pc_arch} --grub-setup=/bin/true $BOOT_PARTITION |
263 |
fi |
fi |
264 |
|
|
|
# make it work with live images |
|
|
if [ "$BOOT_PARTITION" == "overlayfs" ]; then |
|
|
BOOT_PARTITION=$(df -h /mnt/install/boot |(read; awk '{print $1; exit}')) |
|
|
fi |
|
|
|
|
265 |
# On update re-install grub2 to where it was installed by drakboot if possible, |
# On update re-install grub2 to where it was installed by drakboot if possible, |
266 |
# otherwise next boot may fail due to mismatched boot code. |
# otherwise next boot may fail due to mismatched boot code. |
267 |
|
|
327 |
fi |
fi |
328 |
|
|
329 |
%post efi |
%post efi |
330 |
|
# (tmb) WIP |
331 |
|
if [ $1 -eq 1 ]; then |
332 |
|
|
333 |
rm -f /var/log/%{name}_post.log |
rm -f /var/log/%{name}_post.log |
334 |
|
|
335 |
# Determine the partition with /boot |
# Determine the partition with /boot |
336 |
BOOT_PARTITION=$(df -h /boot |(read; awk '{print $1; exit}')) |
BOOT_PARTITION=$(df -h /boot |(read; awk '{print $1; exit}')) |
|
# make it work with live images |
|
|
if [ "$BOOT_PARTITION" == "overlayfs" ]; then |
|
|
BOOT_PARTITION=$(df -h /mnt/install/boot |(read; awk '{print $1; exit}')) |
|
|
fi |
|
337 |
|
|
338 |
# Generate core.img |
# Generate core.img |
339 |
%{name}-install --directory=%{_libdir}/grub/%{efi_arch} --grub-setup=/bin/true $BOOT_PARTITION |
%{name}-install --force --directory=%{_libdir}/grub/%{efi_arch} --grub-setup=/bin/true $BOOT_PARTITION |
340 |
|
|
341 |
# On update re-install grub2 to where it was installed by drakboot |
# On update re-install grub2 to where it was installed by drakboot |
342 |
# otherwise next boot may fail due to mismatched boot code. |
# otherwise next boot may fail due to mismatched boot code. |
371 |
if [ $1 -eq 1 ]; then |
if [ $1 -eq 1 ]; then |
372 |
%{name}-mkconfig -o /boot/%{name}/grub.cfg |
%{name}-mkconfig -o /boot/%{name}/grub.cfg |
373 |
fi |
fi |
374 |
|
fi |
375 |
|
|
376 |
%post mageia-theme |
%post mageia-theme |
377 |
# Don't install if updating |
# Don't install if updating |