diskimage-builder/diskimage_builder/elements/iscsi-boot/extra-data.d/50-check-dracut-regenerate
Noam Angel 48eac8b899 fix iscsi-boot element exiting build even if dracut-regenerate used
in CentOS build case building an image with "iscsi-boot" and "dracut-regenerate" will exit building because of statement "[ "$found" = 0 ]"

Change-Id: I1a6d60e9ec5f5cb508866c8376465c3e73551a30
2020-02-12 09:09:20 +00:00

16 lines
347 B
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
if [[ $DISTRO_NAME = "centos7" ]]; then
eval declare -A image_elements=($(get_image_element_array))
if [[ ! "${image_elements[@]}" =~ "dracut-regenerate" ]]; then
echo "The dracut-regenerate element is required!"
exit 1
fi
fi