diff options
Diffstat (limited to '')
-rwxr-xr-x | modules.d/35network-manager/module-setup.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh index d9a244a..67144f3 100755 --- a/modules.d/35network-manager/module-setup.sh +++ b/modules.d/35network-manager/module-setup.sh @@ -10,7 +10,7 @@ check() { # called by dracut depends() { - echo dbus bash + echo dbus bash net-lib kernel-network-modules return 0 } @@ -51,8 +51,10 @@ install() { inst_simple "$moddir"/nm-initrd.service "$systemdsystemunitdir"/nm-initrd.service inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service - # Adding default link - inst_multiple -o "${systemdnetwork}/99-default.link" + # Adding default link and (if exists) 98-default-mac-none.link + inst_multiple -o \ + "${systemdnetwork}/99-default.link" \ + "${systemdnetwork}/98-default-mac-none.link" [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link" $SYSTEMCTL -q --root "$initdir" enable nm-initrd.service @@ -70,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. |