stage2,initrd-*: fix adding udev rules for named network interfaces
If udev-rule-generator-net is installed on the system, add the interface naming rules from this package to the initrd. If not, add the standard udev rules.
This commit is contained in:
parent
ad6c7671ac
commit
45371fb58e
@ -25,8 +25,6 @@ FEATURES += bootchain-waitdev
|
||||
FEATURES += bootchain-getimage
|
||||
FEATURES += bootchain-nfs
|
||||
FEATURES += bootchain-cifs
|
||||
PUT_UDEV_RULES += *-net-setup-link.rules *-net-description.rules
|
||||
PUT_FILES += /lib/systemd/network/99-default.link
|
||||
EOF
|
||||
|
||||
for module in $(grep -v ^# /.in/modules | sort -u | tr -s '\n' ' '); do
|
||||
|
@ -20,8 +20,6 @@ done
|
||||
|
||||
cat >> /etc/initrd.mk <<EOF
|
||||
FEATURES += add-modules compress cleanup
|
||||
PUT_UDEV_RULES += *-net-setup-link.rules *-net-description.rules
|
||||
PUT_FILES += /lib/systemd/network/99-default.link
|
||||
EOF
|
||||
|
||||
for module in $(grep -v ^# /.in/modules | sort -u | tr -s '\n' ' '); do
|
||||
|
13
features.in/stage2/stage1/scripts.d/10-initrd-udev-rules
Executable file
13
features.in/stage2/stage1/scripts.d/10-initrd-udev-rules
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh -efu
|
||||
|
||||
if rpm -q udev-rule-generator-net; then
|
||||
cat >> /etc/initrd.mk <<-EOF
|
||||
PUT_UDEV_RULES += 75-persistent-net-generator.rules
|
||||
PUT_FILES += /lib/udev/write_net_rules
|
||||
EOF
|
||||
else
|
||||
cat >> /etc/initrd.mk <<-EOF
|
||||
PUT_UDEV_RULES += *-net-setup-link.rules *-net-description.rules
|
||||
PUT_FILES += /lib/systemd/network/99-default.link
|
||||
EOF
|
||||
fi
|
Loading…
Reference in New Issue
Block a user