Blame 2224-network-include-default-mac-none-link.patch

Dusty Mabe 173829
From f6810b69ae722096184eaaf282e12a2caa6928b9 Mon Sep 17 00:00:00 2001
Dusty Mabe 173829
From: Dusty Mabe <dusty@dustymabe.com>
Dusty Mabe 173829
Date: Tue, 21 Feb 2023 22:21:35 -0500
Dusty Mabe 173829
Subject: [PATCH] feat(network): include 98-default-mac-none.link if it exists
Dusty Mabe 173829
Dusty Mabe 173829
In Fedora Linux there was a new 98-default-mac-none.link file added
Dusty Mabe 173829
to set the MACAddressPolicy=none for bond/bridge/team devices. We'd
Dusty Mabe 173829
like for this policy to apply in the initramfs as well. See
Dusty Mabe 173829
Dusty Mabe 173829
- https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none
Dusty Mabe 173829
- https://src.fedoraproject.org/rpms/systemd/pull-request/100#
Dusty Mabe 173829
---
Dusty Mabe 173829
 modules.d/01systemd-networkd/module-setup.sh | 1 +
Dusty Mabe 173829
 modules.d/35network-legacy/module-setup.sh   | 6 ++++--
Dusty Mabe 173829
 modules.d/35network-manager/module-setup.sh  | 6 ++++--
Dusty Mabe 173829
 3 files changed, 9 insertions(+), 4 deletions(-)
Dusty Mabe 173829
Dusty Mabe 173829
diff --git a/modules.d/01systemd-networkd/module-setup.sh b/modules.d/01systemd-networkd/module-setup.sh
Dusty Mabe 173829
index 27d90101..46033549 100755
Dusty Mabe 173829
--- a/modules.d/01systemd-networkd/module-setup.sh
Dusty Mabe 173829
+++ b/modules.d/01systemd-networkd/module-setup.sh
Dusty Mabe 173829
@@ -44,6 +44,7 @@ install() {
Dusty Mabe 173829
         "$systemdnetwork"/80-container-vz.network \
Dusty Mabe 173829
         "$systemdnetwork"/80-vm-vt.network \
Dusty Mabe 173829
         "$systemdnetwork"/80-wifi-adhoc.network \
Dusty Mabe 173829
+        "$systemdnetwork"/98-default-mac-none.link \
Dusty Mabe 173829
         "$systemdnetwork"/99-default.link \
Dusty Mabe 173829
         "$systemdsystemunitdir"/systemd-networkd.service \
Dusty Mabe 173829
         "$systemdsystemunitdir"/systemd-networkd.socket \
Dusty Mabe 173829
diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh
Dusty Mabe 173829
index 868ea8fc..a42f5797 100755
Dusty Mabe 173829
--- a/modules.d/35network-legacy/module-setup.sh
Dusty Mabe 173829
+++ b/modules.d/35network-legacy/module-setup.sh
Dusty Mabe 173829
@@ -23,9 +23,11 @@ installkernel() {
Dusty Mabe 173829
 install() {
Dusty Mabe 173829
     local _arch
Dusty Mabe 173829
 
Dusty Mabe 173829
-    #Adding default link
Dusty Mabe 173829
+    # Adding default link and (if exists) 98-default-mac-none.link
Dusty Mabe 173829
     if dracut_module_included "systemd"; then
Dusty Mabe 173829
-        inst_multiple -o "${systemdnetwork}/99-default.link"
Dusty Mabe 173829
+        inst_multiple -o \
Dusty Mabe 173829
+            "${systemdnetwork}/99-default.link" \
Dusty Mabe 173829
+            "${systemdnetwork}/98-default-mac-none.link"
Dusty Mabe 173829
         [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
Dusty Mabe 173829
     fi
Dusty Mabe 173829
 
Dusty Mabe 173829
diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh
Dusty Mabe 173829
index c5d568f0..6e6cd6cf 100755
Dusty Mabe 173829
--- a/modules.d/35network-manager/module-setup.sh
Dusty Mabe 173829
+++ b/modules.d/35network-manager/module-setup.sh
Dusty Mabe 173829
@@ -51,8 +51,10 @@ install() {
Dusty Mabe 173829
         inst_simple "$moddir"/nm-initrd.service "$systemdsystemunitdir"/nm-initrd.service
Dusty Mabe 173829
         inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service
Dusty Mabe 173829
 
Dusty Mabe 173829
-        # Adding default link
Dusty Mabe 173829
-        inst_multiple -o "${systemdnetwork}/99-default.link"
Dusty Mabe 173829
+        # Adding default link and (if exists) 98-default-mac-none.link
Dusty Mabe 173829
+        inst_multiple -o \
Dusty Mabe 173829
+            "${systemdnetwork}/99-default.link" \
Dusty Mabe 173829
+            "${systemdnetwork}/98-default-mac-none.link"
Dusty Mabe 173829
         [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
Dusty Mabe 173829
 
Dusty Mabe 173829
         $SYSTEMCTL -q --root "$initdir" enable nm-initrd.service
Dusty Mabe 173829
-- 
Dusty Mabe 173829
2.39.2
Dusty Mabe 173829