Blame 0005-feat-network-include-98-default-mac-none.link-if-it-.patch

ff27f8
From aa45d7d857b39e0f2824b94902aa9197bee9a479 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
ff27f8
Subject: [PATCH 05/10] feat(network): include 98-default-mac-none.link if it
ff27f8
 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#
ff27f8
ff27f8
(Cherry-picked commit f6810b69ae722096184eaaf282e12a2caa6928b9 from PR#2224)
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
ff27f8
index 7bbf83c0..f82aa933 100755
Dusty Mabe 173829
--- a/modules.d/01systemd-networkd/module-setup.sh
Dusty Mabe 173829
+++ b/modules.d/01systemd-networkd/module-setup.sh
ff27f8
@@ -47,6 +47,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
ff27f8
index d9a244a3..1e3010a3 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
-- 
ff27f8
2.42.0
Dusty Mabe 173829