]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
feat(systemd-network-management): introducing systemd-network-management module
authorJóhann B. Guðmundsson <johannbg@gmail.com>
Thu, 22 Apr 2021 11:04:24 +0000 (11:04 +0000)
committerHarald Hoyer <harald@hoyer.xyz>
Thu, 22 Apr 2021 14:00:16 +0000 (16:00 +0200)
Introducing the systemd-network-management meta module which will
allow distribution users and vendors to easily include
systemd + systemd's network management modules by simply include this
module instead of systemd network modules individually.

Obviously if the intent is to glue together somekind of network stack
out of random existing modules such as NetworkManager and or Wicked,
this meta module should not be enabled.

dracut.spec
modules.d/00systemd-network-management/module-setup.sh [new file with mode: 0755]

index 4603eb853caece39c8f41401841ac2a3963c16e8..5612561da068aa28b976e82a81681139b28c7385 100644 (file)
@@ -316,6 +316,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
 %endif
 %{dracutlibdir}/modules.d/00bash
 %{dracutlibdir}/modules.d/00systemd
+%{dracutlibdir}/modules.d/00systemd-network-management
 %ifnarch s390 s390x
 %{dracutlibdir}/modules.d/00warpclock
 %endif
diff --git a/modules.d/00systemd-network-management/module-setup.sh b/modules.d/00systemd-network-management/module-setup.sh
new file mode 100755 (executable)
index 0000000..f8ba351
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+# This file is part of dracut.
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Prerequisite check(s) for module.
+check() {
+
+    # Return 255 to only include the module, if another module requires it.
+    return 255
+
+}
+
+# Module dependency requirements.
+depends() {
+
+    # This module has external dependency on other module(s).
+    echo systemd systemd-hostnamed systemd-networkd systemd-resolved systemd-timedated systemd-timesyncd
+    # Return 0 to include the dependent module(s) in the initramfs.
+    return 0
+
+}