diff --git a/diskimage_builder/elements/iscsi-boot/README.rst b/diskimage_builder/elements/iscsi-boot/README.rst index fa867a05..d35f30d2 100644 --- a/diskimage_builder/elements/iscsi-boot/README.rst +++ b/diskimage_builder/elements/iscsi-boot/README.rst @@ -3,7 +3,7 @@ iscsi-boot ========== Handles configuration for the disk to be capable of serving as a remote root filesystem through iSCSI. Currently, this element -can configure Ubuntu/Debian images and CentOS7 images. +can configure Ubuntu/Debian images and CentOS images. It performs the following actions: @@ -13,7 +13,7 @@ For Ubuntu/Debian images: ``ISCSI_AUTO=true`` within it. * Updates the initramfs to apply the changes. -For CentOS7 images: +For CentOS images: * Required ``dracut-regenerate`` element when performs ``disk-image-create``. * Updates ``network`` and ``iscsi`` into ``dracut-regenerate`` during pre-installs. diff --git a/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config b/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config index 3036fd8e..1bb19d5f 100644 --- a/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config +++ b/diskimage_builder/elements/iscsi-boot/environment.d/open-iscsi-config @@ -1,4 +1,4 @@ -if [[ $DISTRO_NAME = "centos7" ]]; then +if [[ $DISTRO_NAME =~ "centos" ]]; then DIB_DRACUT_ENABLED_MODULES+=" - name: network diff --git a/diskimage_builder/elements/iscsi-boot/extra-data.d/50-check-dracut-regenerate b/diskimage_builder/elements/iscsi-boot/extra-data.d/50-check-dracut-regenerate index 4b7c7645..1846a7bb 100755 --- a/diskimage_builder/elements/iscsi-boot/extra-data.d/50-check-dracut-regenerate +++ b/diskimage_builder/elements/iscsi-boot/extra-data.d/50-check-dracut-regenerate @@ -6,7 +6,7 @@ fi set -eu set -o pipefail -if [[ $DISTRO_NAME = "centos7" ]]; then +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!" diff --git a/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config b/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config index 239dc407..440f3179 100755 --- a/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config +++ b/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config @@ -7,7 +7,7 @@ fi set -eu set -o pipefail -if [[ $DISTRO_NAME = "centos7" ]]; then +if [[ $DISTRO_NAME =~ "centos" ]]; then sed -i -E 's/(GRUB_CMDLINE_LINUX_DEFAULT=")(.+)(")/\1\2 rd.iscsi.firmware=1"/' /etc/default/grub grub2-mkconfig -o /boot/grub2/grub.cfg fi