From e942d86c9ddad19f9307d58cb2d99169f6e94edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= Date: Thu, 22 Apr 2021 11:04:24 +0000 Subject: [PATCH] feat(systemd-network-management): introducing systemd-network-management module 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 | 1 + .../module-setup.sh | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100755 modules.d/00systemd-network-management/module-setup.sh diff --git a/dracut.spec b/dracut.spec index 4603eb853c..5612561da0 100644 --- a/dracut.spec +++ b/dracut.spec @@ -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 index 0000000000..f8ba35180c --- /dev/null +++ b/modules.d/00systemd-network-management/module-setup.sh @@ -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 + +}