From 96a95f21da354a926711f35df74bbb2ad1b34039 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 29 Sep 2023 09:39:15 -0400 Subject: [PATCH] fix(45ifcfg): mark as deprecated and strictly opt-in The `45ifcfg` module should be considered deprecated now since ifcfg files themselves are deprecated. They've been replaced by e.g. NetworkManager keyfiles or systemd-networkd files. Currently, the `45ifcfg` module checks if the `/etc/sysconfig/network- scripts` directory exists to know if to automatically get pulled in. However, on systems with NetworkManager, this directory always exists even if the functionality to read ifcfg files is disabled by default (NM kindly ships a README in there to ease migrating to keyfiles). Since almost everyone should've already migrated to a more modern alternative, let's make this module purely opt-in now. --- modules.d/45ifcfg/module-setup.sh | 5 ++++- test/TEST-60-BONDBRIDGEVLAN/test.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules.d/45ifcfg/module-setup.sh b/modules.d/45ifcfg/module-setup.sh index b0d44184c4..cf731be1c3 100755 --- a/modules.d/45ifcfg/module-setup.sh +++ b/modules.d/45ifcfg/module-setup.sh @@ -1,8 +1,11 @@ #!/bin/bash +# This module is deprecated. Modern replacements are NetworkManager keyfiles and +# systemd network files. It must now be explicitly opted in by the user to be +# added to the initrd. + # called by dracut check() { - [[ -d $dracutsysrootdir/etc/sysconfig/network-scripts ]] && return 0 return 255 } diff --git a/test/TEST-60-BONDBRIDGEVLAN/test.sh b/test/TEST-60-BONDBRIDGEVLAN/test.sh index 5110ddb13a..a10630dcdb 100755 --- a/test/TEST-60-BONDBRIDGEVLAN/test.sh +++ b/test/TEST-60-BONDBRIDGEVLAN/test.sh @@ -367,7 +367,7 @@ test_setup() { "$DRACUT" -l -i "$TESTDIR"/overlay / \ --no-early-microcode \ -o "plymouth" \ - -a "debug ${USE_NETWORK}" \ + -a "debug ${USE_NETWORK} ifcfg" \ --no-hostonly-cmdline -N \ -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1