File: init-ibft-interfaces.sh

package info (click to toggle)
python-diskimage-builder 3.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,616 kB
  • sloc: sh: 7,689; python: 3,933; makefile: 34
file content (22 lines) | stat: -rwxr-xr-x 501 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# dib-lint: disable=dibdebugtrace

set -eux
set -o pipefail

# iscsistart is a part of the dependencies, but check just in case.
if ! iscsistart -v; then
    echo "iscsistart not found, iBFT devices won't be connected"
    exit 1
fi

if iscsistart -f; then
    if ! iscsistart -N; then
        echo "Could not configure iBFT devices"
        exit 1
    fi
    # Make sure the events for new devices are processed
    udevadm settle
else
    echo "No iBFT devices to configure, exiting"
fi