Move initrd generation to separate script

This commit is contained in:
Marek Marczykowski 2011-07-15 12:50:38 +02:00
parent 1382dccd77
commit ea413eff37

View File

@ -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}