diff options
Diffstat (limited to 'modules.d/35network-manager')
-rwxr-xr-x | modules.d/35network-manager/module-setup.sh | 12 | ||||
-rwxr-xr-x | modules.d/35network-manager/nm-lib.sh | 1 |
2 files changed, 8 insertions, 5 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. diff --git a/modules.d/35network-manager/nm-lib.sh b/modules.d/35network-manager/nm-lib.sh index 32a288d..f0941de 100755 --- a/modules.d/35network-manager/nm-lib.sh +++ b/modules.d/35network-manager/nm-lib.sh @@ -20,7 +20,6 @@ nm_generate_connections() { /etc/NetworkManager/system-connections/* \ /etc/sysconfig/network-scripts/ifcfg-*; do [ -f "$i" ] || continue - mkdir -p "$hookdir"/initqueue/finished echo '[ -f /tmp/nm.done ]' > "$hookdir"/initqueue/finished/nm.sh mkdir -p /run/NetworkManager/initrd : > /run/NetworkManager/initrd/neednet # activate NM services |