~curtin-dev/curtin/trunk

Viewing all changes in revision 389.

Detect and remove legacy /etc/network/interfaces.d/eth0.cfg from target

Prior to Xenial release, Ubuntu Cloud images included a default network
configuration in /etc/network/interfaces.d/eth0.conf. The presence of
this legacy configuration file can cause a delay during boot when cloud-
init is expecting a non-existent interface to become available. curtin
installations handle configuring networking in the target installed
system subsequently the embedded configuration is not needed.

This patch reuses most of cloud-init's version of detecting and
examining the legacy config, confirming if the contents are what is
expected. Upon finding expected content the file will be removed,
otherwise it will remain.

Additional changes to vmtest and unittest were added to remove the
reliance on fallback nic naming (eth0); we always use non-kernel names
in our configuration now. An additional common test has been added to
check that in all cases we ensure we remove the embedded config.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: