Cleanup stale interface if exists

There is a bug in the CentOS 8 image where the ens3 interface file
exists. We should clean that up if it exists to prevent issues when
booting. We manage the interfaces later with os-net-config so we don't
want them to exist in the image.

Change-Id: I95d851f194a524caad639188e7df8f041fa2a248
Closes-Bug: #1866202
(cherry picked from commit d641e019b9)
This commit is contained in:
Alex Schultz 2020-03-11 10:00:44 -06:00
parent 4461ca141a
commit 8c91b4651e
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#!/bin/bash
set -eux
set -o pipefail
# https://bugs.centos.org/view.php?id=17133
if [ -f /etc/sysconfig/network-scripts/ifcfg-ens3 ]; then
rm -f /etc/sysconfig/network-scripts/ifcfg-ens3
fi