Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct network device naming (bsc#1192986) #290

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions modules.d/35network-legacy/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ installkernel() {
install() {
local _arch

#Adding default link
if dracut_module_included "systemd"; then
# Add default link if there is no persistent network device naming
if [ ! -e /etc/udev/rules.d/70-persistent-net.rules ] &&\
dracut_module_included "systemd"; then

inst_multiple -o "${systemdutildir}/network/99-default.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdutilconfdir}/network/*.link"
fi

inst_multiple ip sed awk grep pgrep tr expr
Expand Down
9 changes: 6 additions & 3 deletions modules.d/35network-manager/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ install() {
inst_simple "$moddir"/nm-initrd.service "$systemdsystemunitdir"/nm-initrd.service
inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service

# Adding default link
inst_multiple -o "${systemdutildir}/network/99-default.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
# Add default link if there is no persistent network device naming
if [ ! -e /etc/udev/rules.d/70-persistent-net.rules ]; then

inst_multiple -o "${systemdutildir}/network/99-default.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdutilconfdir}/network/*.link"
fi

$SYSTEMCTL -q --root "$initdir" enable nm-initrd.service
fi
Expand Down
13 changes: 10 additions & 3 deletions modules.d/95udev-rules/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ install() {
61-persistent-storage-edd.rules \
64-btrfs.rules \
70-uaccess.rules \
70-persistent-net.rules \
71-seat.rules \
73-seat-late.rules \
75-net-description.rules \
Expand All @@ -55,8 +54,16 @@ install() {
inst_rules 91-permissions.rules
# eudev rules
inst_rules 80-drivers-modprobe.rules
# legacy persistent network device name rules
[[ $hostonly ]] && inst_rules 70-persistent-net.rules

# only include persistent network device name rules if network is set up
# in the initrd
# Avoid interference with systemd predictable network device naming
if dracut_module_included "network-legacy" || dracut_module_included "network-manager"; then
if [ -e /etc/udev/rules.d/70-persistent-net.rules ] && \
! dracut_module_included "systemd-networkd"; then
[[ $hostonly ]] && inst_rules 70-persistent-net.rules
fi
fi

{
for i in cdrom tape dialout floppy; do
Expand Down
Loading