From 1a36906b87ec3c9d734aa4d1fe329c90eade2720 Mon Sep 17 00:00:00 2001 From: shengaoya Date: Wed, 24 Jul 2024 23:20:57 -0400 Subject: [PATCH] Resolve the error related to the sfc driver when installing the rpm package Signed-off-by: shengaoya --- kmod-i40e.spec | 52 ++------------------------------------------------ 1 file changed, 2 insertions(+), 50 deletions(-) diff --git a/kmod-i40e.spec b/kmod-i40e.spec index 71689e9..63be3e6 100644 --- a/kmod-i40e.spec +++ b/kmod-i40e.spec @@ -236,7 +236,7 @@ do # add entry to pci.ids exec 0<&3 exec 1>&6 - echo"------------$ids_in-------$VEN--------$vendor" +# echo"------------$ids_in-------$VEN--------$vendor" # while [[ $ids_in != $VEN || # 0x${ids_in:0:4} < $vendor ]] # do @@ -428,30 +428,6 @@ uname -r | grep BOOT || /sbin/depmod -a > /dev/null 2>&1 || true # printf '%s\n' "${modules[@]}" | /usr/sbin/weak-modules --no-initramfs --add-modules #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 - fi -elif which mkinitrd >/dev/null 2>&1; then - echo "Updating initrd with mkinitrd..." - if mkinitrd; then - echo "Successfully updated initrd." - else - echo "Failed to update initrd." - echo "You must update your initrd image for changes to take place." - exit -1 - fi -else - echo "Unable to determine utility to update initrd image." - echo "You must update your initrd manually for changes to take place." - exit -1 -fi - #depmod -a > /dev/null 2>&1 %preun @@ -461,7 +437,7 @@ cat %{_docdir}/%{name}/file.list | grep '\.ko$' | xargs realpath > /var/run/rpm- rm -rf /usr/local/share/%{pkg} %postun -depmod -a > /dev/null 2>&1 +# depmod -a > /dev/null 2>&1 if [ -x "/usr/sbin/weak-modules" ]; then modules=( $(cat /var/run/rpm-%{pkg}-modules.list) ) @@ -469,30 +445,6 @@ if [ -x "/usr/sbin/weak-modules" ]; then 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 - fi -elif which mkinitrd >/dev/null 2>&1; then - echo "Updating initrd with mkinitrd..." - if mkinitrd; then - echo "Successfully updated initrd." - else - echo "Failed to update initrd." - echo "You must update your initrd image for changes to take place." - exit -1 - fi -else - echo "Unable to determine utility to update initrd image." - echo "You must update your initrd manually for changes to take place." - exit -1 -fi - %if (%need_aux_rpm == 2) %package -n intel_auxiliary Summary: Auxiliary bus driver (backport) -- Gitee