sys-fs/udev: rename 80-net-name-slot.rules when migrating from eudev

Closes: https://bugs.gentoo.org/827937
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
This commit is contained in:
Mike Gilbert
2021-12-01 14:58:29 -05:00
parent 9b837383ee
commit 511de38421
3 changed files with 18 additions and 0 deletions

View File

@@ -299,5 +299,11 @@ pkg_postinst() {
ewarn
ewarn "If you wish to disable this, please see the above documentation, or set"
ewarn "net.ifnames=0 on the kernel command line."
if [[ -e ${EROOT}/etc/udev/rules.d/80-net-name-slot.rules ]]; then
ewarn
ewarn "Detected '${EROOT}/etc/udev/rules.d/80-net-name-slot.rules'"
ewarn "Renaming to '${EROOT}/etc/udev/rules.d/80-net-setup-link.rules'"
mv "${EROOT}"/etc/udev/rules.d/80-net-{name-slot,setup-link}.rules
fi
fi
}

View File

@@ -292,5 +292,11 @@ pkg_postinst() {
ewarn
ewarn "If you wish to disable this, please see the above documentation, or set"
ewarn "net.ifnames=0 on the kernel command line."
if [[ -e ${EROOT}/etc/udev/rules.d/80-net-name-slot.rules ]]; then
ewarn
ewarn "Detected '${EROOT}/etc/udev/rules.d/80-net-name-slot.rules'"
ewarn "Renaming to '${EROOT}/etc/udev/rules.d/80-net-setup-link.rules'"
mv "${EROOT}"/etc/udev/rules.d/80-net-{name-slot,setup-link}.rules
fi
fi
}

View File

@@ -299,5 +299,11 @@ pkg_postinst() {
ewarn
ewarn "If you wish to disable this, please see the above documentation, or set"
ewarn "net.ifnames=0 on the kernel command line."
if [[ -e ${EROOT}/etc/udev/rules.d/80-net-name-slot.rules ]]; then
ewarn
ewarn "Detected '${EROOT}/etc/udev/rules.d/80-net-name-slot.rules'"
ewarn "Renaming to '${EROOT}/etc/udev/rules.d/80-net-setup-link.rules'"
mv "${EROOT}"/etc/udev/rules.d/80-net-{name-slot,setup-link}.rules
fi
fi
}