diff options
author | Jonathan Bauer | 2017-09-22 12:44:10 +0200 |
---|---|---|
committer | Jonathan Bauer | 2017-09-22 12:44:10 +0200 |
commit | 8782f1eea7386510679a0dc2d1cfda44a67a1a04 (patch) | |
tree | c47afccc28d6de056eefcd08c5aa9a5c56282430 /builder/modules.d/dnbd3-rootfs/module-setup.sh | |
parent | reworked systemd-networkd module (diff) | |
download | systemd-init-8782f1eea7386510679a0dc2d1cfda44a67a1a04.tar.gz systemd-init-8782f1eea7386510679a0dc2d1cfda44a67a1a04.tar.xz systemd-init-8782f1eea7386510679a0dc2d1cfda44a67a1a04.zip |
[dnbd3-rootfs] add systemd-networkd support
module will now pull 'systemd-networkd-ext' if systemd-inird module is
to be built, or the old 'network' module for the old sysvinit.
Diffstat (limited to 'builder/modules.d/dnbd3-rootfs/module-setup.sh')
-rwxr-xr-x | builder/modules.d/dnbd3-rootfs/module-setup.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/builder/modules.d/dnbd3-rootfs/module-setup.sh b/builder/modules.d/dnbd3-rootfs/module-setup.sh index 549900ad..4089ad24 100755 --- a/builder/modules.d/dnbd3-rootfs/module-setup.sh +++ b/builder/modules.d/dnbd3-rootfs/module-setup.sh @@ -150,7 +150,9 @@ depends() { +doc_test_contains base ' - echo base network bash kernel-modules shutdown + local network_module="network" + dracut_module_included "systemd-initrd" && network_module="systemd-networkd-ext" + echo base bash kernel-modules shutdown "$network_module" } installkernel() { local __doc__=' @@ -195,8 +197,9 @@ install() { # region hooks inst_hook cmdline 00 "$moddir/hooks/enable-sysrq.sh" # NOTE: Can be used to support old style ip append syntax and have an - # exclusive interface name. - inst_hook cmdline 10 \ + # exclusive interface name - required when using dracut's regular + # 'network' module + dracut_module_included "network" && inst_hook cmdline 10 \ "$moddir/hooks/prepare-kernel-command-line-parameter.sh" inst_hook cmdline 90 "$moddir/hooks/set-dracut-environment-variables.sh" inst_hook pre-udev 00 "$moddir/hooks/load-custom-kernel-modules.sh" |