diskimage-builder/diskimage_builder/elements/iscsi-boot/finalise.d/51-open-iscsi-config

17 lines
364 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
if [[ $DISTRO_NAME =~ "centos" ]]; then
if [[ -L /boot/grub2/grubenv ]]; then
rm -f /boot/grub2/grubenv
fi
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