X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=016daec250184843c81c8ce3e4270e5db3243188;hp=18954a9dad277fb1a01f7d7342b34f69e873c579;hb=9a8bfee954f9acb2b27116abbc3b8f57c74a73b7;hpb=4f2362b014a02a67e39994c7000e608b438b9b08 diff --git a/grml-debootstrap b/grml-debootstrap index 18954a9..016daec 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -1723,6 +1723,16 @@ allow-hotplug eth0 iface eth0 inet dhcp " + # add dhcp setting for Predictable Network Interface Names + if [ -x /bin/udevadm ]; then + for interface in $(udevadm info -e | sed -n -e 's/E: ID_NET_NAME_PATH=\([^$*]\)/\1/p'); do + DEFAULT_INTERFACES="${DEFAULT_INTERFACES} +allow-hotplug ${interface} +iface ${interface} inet dhcp +" + done + fi + if [ -n "$NOINTERFACES" ] ; then einfo "Not installing /etc/network/interfaces as requested via --nointerfaces option" ; eend 0 elif [ -n "$USE_DEFAULT_INTERFACES" ] ; then