+newnicnames
+
+case "$FAI_ACTION" in
+ install|dirinstall)
+ ifclass DHCPC && METHOD=dhcp || METHOD=static
+ ifclass XORG && RENDERER=NetworkManager || RENDERER=networkd
+
+ if [ -d $target/etc/netplan ]; then
+ # Ubuntu >= 17.10 with netplan.io
+ if [ -n "$NIC1" ]; then
+ netplan_yaml $NIC1 $METHOD > $target/etc/netplan/01-${NIC1}.yaml
+ fi
+ elif [ -d $target/etc/network/interfaces.d ]; then
+ # ifupdown >= 0.7.41 (Debian >= 8, Ubuntu >= 14.04)
+ iface_stanza lo loopback > $target/etc/network/interfaces.d/lo