diff --git a/kernel-xenlinux.spec b/kernel-xenlinux.spec index b014b73..f2e81c0 100644 --- a/kernel-xenlinux.spec +++ b/kernel-xenlinux.spec @@ -308,19 +308,14 @@ done %post -#Find all network devices -HIDE_PCI=`lspci -mm -n | grep '^[^ ]* "02'|awk '{ ORS="";print "(" $1 ")";}'` - -echo "# This file is autogenerated by kernel post-install script" > /etc/modprobe.d/pciback.conf -echo "# DO NOT EDIT" >> /etc/modprobe.d/pciback.conf -echo "" >> /etc/modprobe.d/pciback.conf -echo "options pciback hide=$HIDE_PCI" >> /etc/modprobe.d/pciback.conf - -dracut --force --add-drivers 'xts aesni-intel aes-x86_64 crc32c-intel fpu ghash-clmulni-intel salsa20-x86_64 twofish-x86_64 pciback' \ - /boot/initramfs-%{kernelrelease}.img %{kernelrelease} +INITRD_OPT="--mkinitrd --dracut" +if [ -x /usr/lib/qubes/regenerate_initramfs.sh ]; then + /usr/lib/qubes/regenerate_initramfs.sh "%{kernelrelease}" + INITRD_OPT="--initrdfile=/boot/initramfs-%{kernelrelease}.img" +fi /sbin/new-kernel-pkg --package %{name}-%{kernelrelease}\ - --initrdfile=/boot/initramfs-%{kernelrelease}.img\ + $INITRD_OPT \ --depmod --kernel-args="max_loop=255 rdloaddriver=pciback"\ --multiboot=/boot/xen.gz --banner="Qubes"\ --make-default --install %{kernelrelease}