/sbin/dracut --force --quiet /boot/initramfs-%{kernel_release}.img %{kernel_release}
fi
-# update boot loaders when old package files are gone from filesystem
-if [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ]; then
- if [ "$(. /etc/sysconfig/grub; echo ${UPDATE_GRUB:-no})" = "yes" ]; then
- /sbin/update-grub >/dev/null
- fi
+# update boot loader
+[ -x /sbin/update-grub -a -f /etc/sysconfig/grub ] && . /etc/sysconfig/grub
+if [[ "$UPDATE_GRUB" != [Nn][Oo] ]]; then
+ /sbin/update-grub
fi
if [ -x /sbin/new-kernel-pkg ]; then