rpm: change post script to not use grubby

This commit is contained in:
Marek Marczykowski-Górecki 2015-07-10 18:02:37 +02:00
parent cf57570e61
commit 7d9d60eb69
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -60,9 +60,6 @@ Provides: kernel-drm-nouveau = 16
Provides: kernel-modules-extra = %kernelrelease Provides: kernel-modules-extra = %kernelrelease
Provides: kernel-modeset = 1 Provides: kernel-modeset = 1
Requires(post): /sbin/new-kernel-pkg
Requires(preun):/sbin/new-kernel-pkg
Requires(pre): coreutils gawk Requires(pre): coreutils gawk
Requires(post): dracut binutils Requires(post): dracut binutils
@ -345,31 +342,13 @@ do
done done
%post %post
/sbin/depmod -a %{kernelrelease}
INITRD_OPT="--mkinitrd --dracut"
/sbin/new-kernel-pkg --package %{name}-%{kernelrelease}\
$INITRD_OPT \
--depmod --kernel-args="max_loop=255"\
--multiboot=/boot/xen.gz --mbargs="console=none" \
--banner="Qubes"\
--make-default --install %{kernelrelease}
if [ -e /boot/grub/grub.conf ]; then
# Make it possible to enter GRUB menu if something goes wrong...
sed -i "s/^timeout *=.*/timeout=3/" /boot/grub/grub.conf
fi
%posttrans %posttrans
/sbin/new-kernel-pkg --package %{name}-%{kernelrelease} --rpmposttrans %{kernelrelease} /bin/kernel-install add %{kernelrelease} /boot/vmlinuz-%{kernelrelease} || exit $?
# grubby (used by new-kernel-pkg) do not understand xen entries in grub2 config
if [ -e /boot/grub2/grub.cfg ]; then
grub2-mkconfig > /boot/grub2/grub.cfg
fi
%preun %preun
/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{kernelrelease} /bin/kernel-install remove %{kernelrelease} /boot/vmlinuz-%{kernelrelease} || exit $?
%files %files
%defattr(-, root, root) %defattr(-, root, root)