File: 02-set-machine-id

package info (click to toggle)
python-diskimage-builder 3.37.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,572 kB
  • sloc: sh: 7,380; python: 6,444; makefile: 37
file content (23 lines) | stat: -rwxr-xr-x 775 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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