diff --git a/kmod-ixgbe.spec b/kmod-ixgbe.spec index 23547578ed824e7f4178f1f74d7cbde6fd42d16a..4b9da9b9401f97da5efc31bbacf2bc814b11eed5 100644 --- a/kmod-ixgbe.spec +++ b/kmod-ixgbe.spec @@ -413,12 +413,14 @@ fi if which dracut >/dev/null 2>&1; then echo "Updating initramfs with dracut..." - if dracut --force ; then - echo "Successfully updated initramfs." - else - echo "Failed to update initramfs." - echo "You must update your initramfs image for changes to take place." - exit -1 + if [ -e "/boot/initramfs-`uname -r`.img" ]; then + if dracut --force ; then + echo "Successfully updated initramfs." + else + echo "Failed to update initramfs." + echo "You must update your initramfs image for changes to take place." + exit -1 + fi fi elif which mkinitrd >/dev/null 2>&1; then echo "Updating initrd with mkinitrd..." @@ -454,13 +456,15 @@ fi rm /var/run/rpm-%{pkg}-modules.list if which dracut >/dev/null 2>&1; then - echo "Updating initramfs with dracut..." - if dracut --force ; then - echo "Successfully updated initramfs." - else - echo "Failed to update initramfs." - echo "You must update your initramfs image for changes to take place." - exit -1 + if [ -e "/boot/initramfs-`uname -r`.img" ]; then + echo "Updating initramfs with dracut..." + if dracut --force ; then + echo "Successfully updated initramfs." + else + echo "Failed to update initramfs." + echo "You must update your initramfs image for changes to take place." + exit -1 + fi fi elif which mkinitrd >/dev/null 2>&1; then echo "Updating initrd with mkinitrd..."