+++ /dev/null
----
- cloudinit/sources/DataSourceConfigDrive.py | 13 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
-
---- a/cloudinit/sources/DataSourceConfigDrive.py
-+++ b/cloudinit/sources/DataSourceConfigDrive.py
-@@ -52,12 +52,13 @@ class ConfigDriveHelper(object):
- def __init__(self, distro):
- self.distro = distro
-
-- def on_first_boot(self, data):
-+ def on_first_boot(self, data, dsmode="local"):
- if not data:
- data = {}
-- if 'network_config' in data:
-- LOG.debug("Updating network interfaces from config drive")
-- self.distro.apply_network(data['network_config'])
-+ if dsmode == "local":
-+ if 'network_config' in data:
-+ LOG.debug("Updating network interfaces from config drive")
-+ self.distro.apply_network(data['network_config'])
- files = data.get('files')
- if files:
- LOG.debug("Writing %s injected files", len(files))
-@@ -214,8 +215,8 @@ class DataSourceConfigDrive(sources.Data
- # instance-id
- prev_iid = get_previous_iid(self.paths)
- cur_iid = md['instance-id']
-- if prev_iid != cur_iid and self.dsmode == "local":
-- self.helper.on_first_boot(results)
-+ if prev_iid != cur_iid:
-+ self.helper.on_first_boot(results, dsmode=self.dsmode)
-
- # dsmode != self.dsmode here if:
- # * dsmode = "pass", pass means it should only copy files and then