Skip to content

Commit

Permalink
feat(net-lib): add a new module more net-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
LaszloGombos committed Feb 28, 2023
1 parent 0e78072 commit b87dcbc
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,6 @@ test:
- test/**/*
- modules.d/80test*
- modules.d/80test*/*

net-lib:
- modules.d/45net-lib/*
2 changes: 1 addition & 1 deletion modules.d/01systemd-networkd/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion modules.d/35connman/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ check() {

# called by dracut
depends() {
echo dbus systemd bash
echo dbus systemd bash net-lib
return 0
}

Expand Down
1 change: 1 addition & 0 deletions modules.d/35network-legacy/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ check() {

# called by dracut
depends() {
echo net-lib
return 0
}

Expand Down
2 changes: 1 addition & 1 deletion modules.d/35network-manager/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ check() {

# called by dracut
depends() {
echo dbus bash
echo dbus bash net-lib
return 0
}

Expand Down
18 changes: 1 addition & 17 deletions modules.d/40network/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions modules.d/45net-lib/module-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

check() {
return 0
}

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
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion modules.d/95nfs/nfs-lib.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit b87dcbc

Please sign in to comment.