diff --git a/kmod-ast.spec b/kmod-ast.spec index 6e4d9796f2c9d1713f409debf60b889cc726515d..8b3e29266e07c62bbdceb2a3f7196b1a7c1883c4 100644 --- a/kmod-ast.spec +++ b/kmod-ast.spec @@ -71,7 +71,7 @@ depmod -a > /dev/null 2>&1 for kernel in /lib/modules/*; do kversion=$(basename $kernel) - dracut -f --kver "$kversion" > /dev/null 2>&1 + if [ -e "/boot/initramfs-`uname -r`.img" ]; then dracut -f --kver "$kversion" > /dev/null 2>&1 ;fi done if [ -x "/usr/sbin/weak-modules" ]; then @@ -86,7 +86,7 @@ depmod -a > /dev/null 2>&1 for kernel in /lib/modules/*; do kversion=$(basename $kernel) - dracut -f --kver "$kversion" > /dev/null 2>&1 + if [ -e "/boot/initramfs-`uname -r`.img" ]; then dracut -f --kver "$kversion" > /dev/null 2>&1 ;fi done if [ -x "/usr/sbin/weak-modules" ]; then