#!/bin/bash

if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
    set -x
fi

set -eu
set -o pipefail

if [[ "$DISTRO_NAME" =~ (rhel|centos) ]] && [ "$DIB_RELEASE" == "8" ]; then
    chkconfig network on
fi

if [[ "$DISTRO_NAME" =~ (ubuntu) ]] && [ "$DIB_RELEASE" == "focal" ]; then
    systemctl enable systemd-networkd
fi
