diskimage-builder/diskimage_builder/elements/iscsi-boot/extra-data.d/50-check-dracut-regenerate
Xinliang Liu fd850475ea Make iscsi-boot element support centos 8
This patch makes iscsi-boot element support not only just
DISTRO_NAME centos7 but also centos and centos-minimal.

Change-Id: I8db8b01f35b2e572666badd8d2316d24a5e4287a
2020-08-25 09:28:27 +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 =~ "centos" ]]; 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