Skip to content

Commit 69f4e7c

Browse files
johannbgharaldh
authored andcommitted
fix(udev-rules): remove sourcing of network link files
Removing sourcing of network link files from the udev-rules module. What always should be included should be placed in the systemd-network module and other modules that provide/require spesific link files should add them, themselves via their relevant include section.
1 parent fd883a5 commit 69f4e7c

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

modules.d/35network-legacy/module-setup.sh

+7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ installkernel() {
2121
# called by dracut
2222
install() {
2323
local _arch
24+
25+
#Adding default link
26+
if dracut_module_included "systemd"; then
27+
inst_multiple -o "${systemdutildir}/network/99-default.link"
28+
[[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
29+
fi
30+
2431
inst_multiple ip dhclient sed awk grep pgrep tr
2532

2633
inst_multiple -o arping arping2

modules.d/35network-manager/module-setup.sh

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ install() {
4545
inst_simple "$moddir"/nm-initrd.service "$systemdsystemunitdir"/nm-initrd.service
4646
inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service
4747

48+
# Adding default link
49+
inst_multiple -o "${systemdutildir}/network/99-default.link"
50+
[[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
51+
4852
$SYSTEMCTL -q --root "$initdir" enable nm-initrd.service
4953
fi
5054

modules.d/95udev-rules/module-setup.sh

-5
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ install() {
5757
# legacy persistent network device name rules
5858
[[ $hostonly ]] && inst_rules 70-persistent-net.rules
5959

60-
if dracut_module_included "systemd"; then
61-
inst_multiple -o "${systemdutildir}/network/*.link"
62-
[[ $hostonly ]] && inst_multiple -H -o "/etc/systemd/network/*.link"
63-
fi
64-
6560
{
6661
for i in cdrom tape dialout floppy; do
6762
if ! grep -q "^$i:" "$initdir"/etc/group 2> /dev/null; then

test/TEST-30-ISCSI/test.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,7 @@ test_setup() {
242242
)
243243
inst /etc/passwd /etc/passwd
244244
inst_multiple sh ls shutdown poweroff stty cat ps ln ip \
245-
dmesg mkdir cp ping \
246-
modprobe tcpdump setsid \
245+
dmesg mkdir cp ping modprobe tcpdump setsid \
247246
/etc/services sleep mount chmod pidof
248247
inst_multiple tgtd tgtadm
249248
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
@@ -314,7 +313,6 @@ test_setup() {
314313
inst_multiple poweroff shutdown
315314
inst_hook shutdown-emergency 000 ./hard-off.sh
316315
inst_hook emergency 000 ./hard-off.sh
317-
inst_simple ./99-default.link /etc/systemd/network/99-default.link
318316
)
319317

320318
# Make server's dracut image

0 commit comments

Comments
 (0)