diff --git a/.github/labeler.yml b/.github/labeler.yml index ba47d04974..5fe047da8d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -290,3 +290,6 @@ test: - test/**/* - modules.d/80test* - modules.d/80test*/* + +net-lib: + - modules.d/45net-lib/* diff --git a/modules.d/01systemd-networkd/module-setup.sh b/modules.d/01systemd-networkd/module-setup.sh index 27d901015b..0dcbcb572c 100755 --- a/modules.d/01systemd-networkd/module-setup.sh +++ b/modules.d/01systemd-networkd/module-setup.sh @@ -22,7 +22,7 @@ check() { depends() { # This module has external dependency on other module(s). - echo dbus kernel-network-modules systemd-sysusers + echo dbus kernel-network-modules systemd-sysusers net-lib # Return 0 to include the dependent module(s) in the initramfs. return 0 diff --git a/modules.d/35connman/module-setup.sh b/modules.d/35connman/module-setup.sh index 6502d307ed..df30f2e44b 100755 --- a/modules.d/35connman/module-setup.sh +++ b/modules.d/35connman/module-setup.sh @@ -10,7 +10,7 @@ check() { # called by dracut depends() { - echo dbus systemd bash + echo dbus systemd bash net-lib return 0 } diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh index 868ea8fc29..4aef11924c 100755 --- a/modules.d/35network-legacy/module-setup.sh +++ b/modules.d/35network-legacy/module-setup.sh @@ -10,6 +10,7 @@ check() { # called by dracut depends() { + echo net-lib return 0 } diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh index c5d568f0bc..df49a991f8 100755 --- a/modules.d/35network-manager/module-setup.sh +++ b/modules.d/35network-manager/module-setup.sh @@ -10,7 +10,7 @@ check() { # called by dracut depends() { - echo dbus bash + echo dbus bash net-lib return 0 } diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh index ba7104d9df..323b127926 100755 --- a/modules.d/40network/module-setup.sh +++ b/modules.d/40network/module-setup.sh @@ -27,22 +27,6 @@ depends() { network_handler="network-legacy" fi fi - echo "kernel-network-modules $network_handler" + echo "net-lib kernel-network-modules $network_handler" return 0 } - -# called by dracut -installkernel() { - return 0 -} - -# called by dracut -install() { - inst_script "$moddir/netroot.sh" "/sbin/netroot" - inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh" - inst_hook pre-udev 50 "$moddir/ifname-genrules.sh" - inst_hook cmdline 91 "$moddir/dhcp-root.sh" - inst_multiple ip sed awk grep pgrep tr - inst_multiple -o arping arping2 - dracut_need_initqueue -} diff --git a/modules.d/40network/dhcp-root.sh b/modules.d/45net-lib/dhcp-root.sh similarity index 100% rename from modules.d/40network/dhcp-root.sh rename to modules.d/45net-lib/dhcp-root.sh diff --git a/modules.d/40network/ifname-genrules.sh b/modules.d/45net-lib/ifname-genrules.sh similarity index 100% rename from modules.d/40network/ifname-genrules.sh rename to modules.d/45net-lib/ifname-genrules.sh diff --git a/modules.d/45net-lib/module-setup.sh b/modules.d/45net-lib/module-setup.sh new file mode 100755 index 0000000000..8053aa6f3a --- /dev/null +++ b/modules.d/45net-lib/module-setup.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +check() { + return 255 +} + +depends() { + echo base + return 0 +} + +install() { + inst_script "$moddir/netroot.sh" "/sbin/netroot" + inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh" + inst_hook pre-udev 50 "$moddir/ifname-genrules.sh" + inst_hook cmdline 91 "$moddir/dhcp-root.sh" + inst_multiple ip sed awk grep pgrep tr + inst_multiple -o arping arping2 + dracut_need_initqueue +} diff --git a/modules.d/40network/net-lib.sh b/modules.d/45net-lib/net-lib.sh similarity index 100% rename from modules.d/40network/net-lib.sh rename to modules.d/45net-lib/net-lib.sh diff --git a/modules.d/40network/netroot.sh b/modules.d/45net-lib/netroot.sh similarity index 100% rename from modules.d/40network/netroot.sh rename to modules.d/45net-lib/netroot.sh diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh index f00067124e..ca22a13d5b 100755 --- a/modules.d/95nfs/nfs-lib.sh +++ b/modules.d/95nfs/nfs-lib.sh @@ -1,7 +1,7 @@ #!/bin/sh type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh -. /lib/net-lib.sh +#. /lib/net-lib.sh # TODO: make these things not pollute the calling namespace