Skip to content

Commit

Permalink
fix(35-network-manager): let the kernel generate a UUID for /etc/mach…
Browse files Browse the repository at this point in the history
…ine-id

This allows the module to work without systemd.

See-also: dracutdevs/dracut#534
Bug: https://bugs.gentoo.org/677554
Co-authored-by: Mike Gilbert <[email protected]>
Signed-off-by: Andrew Ammerlaan <[email protected]>
  • Loading branch information
2 people authored and LaszloGombos committed May 3, 2024
1 parent db20908 commit 1e2b5c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules.d/35network-manager/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ install() {
elif ! [[ -e "$initdir/etc/machine-id" ]]; then
# The internal DHCP client silently fails if we
# have no machine-id
systemd-machine-id-setup --root="$initdir"
local UUID
UUID=$(< /proc/sys/kernel/random/uuid)
echo "${UUID//-/}" > "$initdir/etc/machine-id"
fi

# We don't install the ifcfg files from the host automatically.
Expand Down

0 comments on commit 1e2b5c3

Please sign in to comment.