#!/bin/bash
## kola:
##   # This is a read-only test that can be run with other tests.
##   exclusive: false
##   description: Verify that CLHM wrote a snippet for the NIC IP info.

# See https://github.com/coreos/fedora-coreos-tracker/issues/1153

set -xeuo pipefail

# shellcheck disable=SC1091
. "$KOLA_EXT_DATA/commonlib.sh"

# CLHM v0.22.0 switched writing issues from /etc to /run.
# Check both locations until all
# streams have picked up the new CLHM.
found=false
for file in /run/issue.d/22*.issue /etc/issue.d/22*.issue; do
    if [ -f "$file" ]; then
        found=true
        break
    fi
done

if ! $found; then
    fatal "Network Device info does not exist"
fi
ok "Network Device info exists"
