diskimage-builder/diskimage_builder/elements/centos/pre-install.d/02-set-machine-id
Carlos Goncalves 8226384cf0 Add CentOS 8 support
* Add "centos" element, a CentOS version-independent element. This is in
  line with the same work done for RHEL in Stein cycle.
* Deprecate the centos7 element. CentOS 7 support itself it not
  deprecated though. The new "centos" element provides the same support
  level as the "centos7" element.
* Add functional testing

The default CentOS version is 8. You can adjust it using the DIB_RELEASE
environment variable.

Change-Id: I373ba2296c4613765676e59aabd9c651345298d1
2020-02-19 10:44:56 +01:00

24 lines
775 B
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# Set a machine-id. The .qcow2 image doesn't have one, and sometimes
# one will get made (if systemd is upgraded as part of the build
# process) and sometimes not. The problem is that certain kernel
# install scripts bail silently without it; kernel packages end up
# being installed but the initramfs etc isn't copied into place.
#
# Note this is cleared out in the sysprep role.
#
# See also:
# 768c5e188c1b4bff01da14a49b96b51301db4c03 : similar thing for fedora
# https://bugzilla.redhat.com/show_bug.cgi?id=1737355 : upstream bug
# https://bugzilla.redhat.com/show_bug.cgi?id=1486124 : unresolved
# bug about kernel install requiring machine-id
systemd-machine-id-setup