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 %post
#Find all network devices INITRD_OPT="--mkinitrd --dracut"
HIDE_PCI=`lspci -mm -n | grep '^[^ ]* "02'|awk '{ ORS="";print "(" $1 ")";}'` if [ -x /usr/lib/qubes/regenerate_initramfs.sh ]; then
/usr/lib/qubes/regenerate_initramfs.sh "%{kernelrelease}"
echo "# This file is autogenerated by kernel post-install script" > /etc/modprobe.d/pciback.conf INITRD_OPT="--initrdfile=/boot/initramfs-%{kernelrelease}.img"
echo "# DO NOT EDIT" >> /etc/modprobe.d/pciback.conf fi
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}
/sbin/new-kernel-pkg --package %{name}-%{kernelrelease}\ /sbin/new-kernel-pkg --package %{name}-%{kernelrelease}\
--initrdfile=/boot/initramfs-%{kernelrelease}.img\ $INITRD_OPT \
--depmod --kernel-args="max_loop=255 rdloaddriver=pciback"\ --depmod --kernel-args="max_loop=255 rdloaddriver=pciback"\
--multiboot=/boot/xen.gz --banner="Qubes"\ --multiboot=/boot/xen.gz --banner="Qubes"\
--make-default --install %{kernelrelease} --make-default --install %{kernelrelease}