Merge "Fix uniqueness check of initrd in fedora-minimal"

This commit is contained in:
Jenkins 2015-11-05 03:36:13 +00:00 committed by Gerrit Code Review
commit 8c42e60df5

View File

@ -9,7 +9,7 @@ set -o pipefail
initrd=$(find /boot -name initrd) initrd=$(find /boot -name initrd)
kernel_version=$(rpm -qa | grep kernel | sort | head -n 1 | cut -d '-' -f 2,3) kernel_version=$(rpm -qa | grep kernel | sort | head -n 1 | cut -d '-' -f 2,3)
if [ "$(echo $initrd | wc -l)" -eq 1 ]; then if [ -n "$initrd" -a $(echo "$initrd" | wc -l) -eq 1 ]; then
cp $initrd /boot/initrd-$kernel_version.img cp $initrd /boot/initrd-$kernel_version.img
else else
echo "Zero or multiple initrds found. This should not happen." echo "Zero or multiple initrds found. This should not happen."