- local guest_interfaces=${lxc_root}/etc/network/interfaces
- ( [ -n "$NAT_MODE" ] && write_guest_interfaces_natip || write_guest_interfaces_publicip ) > $guest_interfaces
+ local lxc=$1; shift
+ local fcdistro=$1; shift
+ case $(network_method $fcdistro) in
+ interfaces)
+ local guest_interfaces=${lxc_root}/etc/network/interfaces
+ ( [ -n "$NAT_MODE" ] \
+ && write_guest_interfaces_natip \
+ || write_guest_interfaces_publicip ) > $guest_interfaces
+ ;;
+ systemd)
+ local systemd_config="${lxc_root}/etc/systemd/network/wired.network"
+ ( [ -n "$NAT_MODE" ] \
+ && write_guest_systemd_natip \
+ || write_guest_systemd_publicip ) > $systemd_config
+ chroot "${lxc_root}" systemctl enable systemd-networkd
+ ;;
+ esac