summaryrefslogtreecommitdiff
path: root/bin/cloud-init
diff options
context:
space:
mode:
Diffstat (limited to 'bin/cloud-init')
-rwxr-xr-xbin/cloud-init7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/cloud-init b/bin/cloud-init
index 715be4b5..5857af32 100755
--- a/bin/cloud-init
+++ b/bin/cloud-init
@@ -266,7 +266,12 @@ def main_init(name, args):
return (None, ["No instance datasource found."])
if args.local:
- init.apply_network_config()
+ if not init.ds_restored:
+ # if local mode and the datasource was not restored from cache
+ # (this is not first boot) then apply networking.
+ init.apply_network_config()
+ else:
+ LOG.debug("skipping networking config from restored datasource.")
# Stage 6
iid = init.instancify()