File: 51-open-iscsi-config

package info (click to toggle)
python-diskimage-builder 3.39.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 5,704 kB
  • sloc: sh: 7,474; python: 6,454; makefile: 37
file content (16 lines) | stat: -rwxr-xr-x 364 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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