diff --git a/SPECS/kmod-lpfc.spec b/SPECS/kmod-lpfc.spec index a820f77..9ae0bd5 100644 --- a/SPECS/kmod-lpfc.spec +++ b/SPECS/kmod-lpfc.spec @@ -67,6 +67,9 @@ Provides: %{name}-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{vers Requires(post): /usr/sbin/depmod Requires(postun): /usr/sbin/depmod +Requires(post): /usr/bin/dracut +Requires(postun): /usr/bin/dracut + %description This package provides the Emulex LightPulse Fibre Channel SCSI (%{pkg}) driver. @@ -152,6 +155,19 @@ then /usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch} fi + if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ] + then + if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch} + then + if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew + then + mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img + else + rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew + fi + fi + fi + rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods fi @@ -165,6 +181,19 @@ then /usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch} fi + if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ] + then + if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch} + then + if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew + then + mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img + else + rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew + fi + fi + fi + rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods fi