X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=a87dbab67c702c12d8f24b8270ddb5e753056daf;hp=5dbe1a77ffd4e7155d810265816fc29e605f70dd;hb=6359370c21819973a396b6277bcf3f04b25aa565;hpb=0b1d9821475753d8580982724b807cc8f2daa7e5 diff --git a/grml-debootstrap b/grml-debootstrap index 5dbe1a7..a87dbab 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -1728,6 +1728,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