[Git-commits] [grml/grml-debootstrap] 2860f1: Fix detection of predictable network interface names

Michael Prokop noreply at github.com
Fri May 31 19:29:42 CEST 2019


  Branch: refs/heads/mika/buster
  Home:   https://github.com/grml/grml-debootstrap
  Commit: 2860f131b65664467209350e16f39f75b7b27af0
      https://github.com/grml/grml-debootstrap/commit/2860f131b65664467209350e16f39f75b7b27af0
  Author: Michael Prokop <mika at grml.org>
  Date:   2019-05-31 (Fri, 31 May 2019)

  Changed paths:
    M grml-debootstrap

  Log Message:
  -----------
  Fix detection of predictable network interface names

E.g. virtio drivers might have the properties ID_NET_NAME_PATH=enp0s18
and ID_NET_NAME_SLOT=ens18. If we check only for ID_NET_NAME_PATH, then
we end up with a network configuration for enp0s18, while the actual
network interface name will be ens18.

So instead look at all present network devices, iterate over them
(ignoring the virtual interfaces like bridges + vboxnet) and
check for present ID_NET_NAME_* settings, using the following precedence
(as defined in link_config_apply() of systemd/src/udev/net/link-config.c):

* ID_NET_NAME_FROM_DATABASE
* ID_NET_NAME_ONBOARD
* ID_NET_NAME_SLOT
* ID_NET_NAME_PATH
* ID_NET_NAME_MAC

Closes: #929810




More information about the Git-commits mailing list