fix posttrans script to avoid creating initramfs if related kernel is missing [release 044.20161015git-3mamba;Tue Apr 18 2017]
This commit is contained in:
parent
fa5b90a648
commit
f13d75e7fb
@ -1,6 +1,6 @@
|
|||||||
Name: dracut
|
Name: dracut
|
||||||
Version: 044.20161015git
|
Version: 044.20161015git
|
||||||
Release: 2mamba
|
Release: 3mamba
|
||||||
Summary: Generic, modular initramfs generation tool that can be used across various distributions
|
Summary: Generic, modular initramfs generation tool that can be used across various distributions
|
||||||
Group: System/Kernel and Hardware
|
Group: System/Kernel and Hardware
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
@ -149,9 +149,9 @@ ln -s ../bin/mkinitrd %{buildroot}%{_sbindir}/mkinitrd
|
|||||||
|
|
||||||
%posttrans
|
%posttrans
|
||||||
if [ $1 -ge 1 ]; then
|
if [ $1 -ge 1 ]; then
|
||||||
if [ -e /boot/vmlinuz-$KVER ]; then
|
|
||||||
KVER=`uname -r`
|
KVER=`uname -r`
|
||||||
INITRAMFS=/boot/initramfs-$KVER.img
|
INITRAMFS=/boot/initramfs-$KVER.img
|
||||||
|
if [ -e /boot/vmlinuz-$KVER ]; then
|
||||||
[ -e $INITRAMFS -a ${_sysconfdir}/dracut.conf -nt $INITRAMFS ] || continue
|
[ -e $INITRAMFS -a ${_sysconfdir}/dracut.conf -nt $INITRAMFS ] || continue
|
||||||
mkinitrd $INITRAMFS $KVER -f -q
|
mkinitrd $INITRAMFS $KVER -f -q
|
||||||
fi
|
fi
|
||||||
@ -367,6 +367,9 @@ fi
|
|||||||
#%doc NEWS README README.generic README.kernel README.modules TODO
|
#%doc NEWS README README.generic README.kernel README.modules TODO
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 18 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 044.20161015git-3mamba
|
||||||
|
- fix posttrans script to avoid creating initramfs if related kernel is missing
|
||||||
|
|
||||||
* Mon Apr 10 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 044.20161015git-2mamba
|
* Mon Apr 10 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 044.20161015git-2mamba
|
||||||
- posttrans: check for kernel image existence before making initrd (to fix chroot makedist installation)
|
- posttrans: check for kernel image existence before making initrd (to fix chroot makedist installation)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user