Commit 45371fb5 authored by Anton Midyukov's avatar Anton Midyukov

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.
parent ad6c7671
......@@ -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
......
#!/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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment