mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-28 07:44:52 +00:00
Don't modify grub config in the grub package scriptlets.
It's just really bad style.
This commit is contained in:
parent
41a54de8fa
commit
7c097239ad
1 changed files with 0 additions and 10 deletions
10
grub2.spec
10
grub2.spec
|
@ -209,18 +209,10 @@ install -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/default/grub
|
|||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
exec >/dev/null 2>&1
|
||||
# Create device.map or reuse one from GRUB Legacy
|
||||
cp -u /boot/grub/device.map /boot/%{name}/device.map 2>/dev/null ||
|
||||
%{name}-mkdevicemap
|
||||
# Determine the partition with /boot
|
||||
BOOT_PARTITION=$(df -h /boot |(read; awk '{print $1; exit}'))
|
||||
# Generate core.img, but don't let it be installed in boot sector
|
||||
%{name}-install --grub-setup=/bin/true $BOOT_PARTITION
|
||||
# Remove stale menu.lst entries
|
||||
/sbin/grubby --remove-kernel=/boot/%{name}/core.img
|
||||
# Add core.img as multiboot kernel to GRUB Legacy menu
|
||||
/sbin/grubby --add-kernel=/boot/%{name}/core.img --title="GNU GRUB 2, (%{version})"
|
||||
if [ "$1" = 1 ]; then
|
||||
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/grub2.info.gz || :
|
||||
fi
|
||||
|
@ -230,8 +222,6 @@ fi
|
|||
if [ "$1" = 0 ]; then
|
||||
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/grub2.info.gz || :
|
||||
fi
|
||||
exec >/dev/null
|
||||
/sbin/grubby --remove-kernel=/boot/%{name}/core.img
|
||||
# XXX Ugly
|
||||
rm -f /boot/%{name}/*.mod
|
||||
rm -f /boot/%{name}/*.img
|
||||
|
|
Loading…
Reference in a new issue