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
This commit is contained in:
parent
d140cc239a
commit
fd850475ea
@ -3,7 +3,7 @@ iscsi-boot
|
|||||||
==========
|
==========
|
||||||
Handles configuration for the disk to be capable of serving as
|
Handles configuration for the disk to be capable of serving as
|
||||||
a remote root filesystem through iSCSI. Currently, this element
|
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:
|
It performs the following actions:
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ For Ubuntu/Debian images:
|
|||||||
``ISCSI_AUTO=true`` within it.
|
``ISCSI_AUTO=true`` within it.
|
||||||
* Updates the initramfs to apply the changes.
|
* Updates the initramfs to apply the changes.
|
||||||
|
|
||||||
For CentOS7 images:
|
For CentOS images:
|
||||||
* Required ``dracut-regenerate`` element when performs ``disk-image-create``.
|
* Required ``dracut-regenerate`` element when performs ``disk-image-create``.
|
||||||
* Updates ``network`` and ``iscsi`` into ``dracut-regenerate`` during
|
* Updates ``network`` and ``iscsi`` into ``dracut-regenerate`` during
|
||||||
pre-installs.
|
pre-installs.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if [[ $DISTRO_NAME = "centos7" ]]; then
|
if [[ $DISTRO_NAME =~ "centos" ]]; then
|
||||||
|
|
||||||
DIB_DRACUT_ENABLED_MODULES+="
|
DIB_DRACUT_ENABLED_MODULES+="
|
||||||
- name: network
|
- name: network
|
||||||
|
@ -6,7 +6,7 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
if [[ $DISTRO_NAME = "centos7" ]]; then
|
if [[ $DISTRO_NAME =~ "centos" ]]; then
|
||||||
eval declare -A image_elements=($(get_image_element_array))
|
eval declare -A image_elements=($(get_image_element_array))
|
||||||
if [[ ! "${image_elements[@]}" =~ "dracut-regenerate" ]]; then
|
if [[ ! "${image_elements[@]}" =~ "dracut-regenerate" ]]; then
|
||||||
echo "The dracut-regenerate element is required!"
|
echo "The dracut-regenerate element is required!"
|
||||||
|
@ -7,7 +7,7 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
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
|
sed -i -E 's/(GRUB_CMDLINE_LINUX_DEFAULT=")(.+)(")/\1\2 rd.iscsi.firmware=1"/' /etc/default/grub
|
||||||
grub2-mkconfig -o /boot/grub2/grub.cfg
|
grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user