diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-02-07 11:10:40 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-02-07 11:10:40 -0500 |
commit | 8ba08be9c27852aa2a40f1c6fbd497d95443eb3e (patch) | |
tree | 969f678e6374d00c1f943228589242f074119fae /cloud-init.py | |
parent | 7077e1481ee22d99126ceb011b8819bd1a23487c (diff) | |
download | vyos-cloud-init-8ba08be9c27852aa2a40f1c6fbd497d95443eb3e.tar.gz vyos-cloud-init-8ba08be9c27852aa2a40f1c6fbd497d95443eb3e.zip |
add config option 'manual_cache_clean'.
This option allows user to specify manual cleaning of the
/var/lib/cloud/instance/ link, for a data source that might not be present on
every boot.
Diffstat (limited to 'cloud-init.py')
-rwxr-xr-x | cloud-init.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cloud-init.py b/cloud-init.py index c9c03b3f..e8454eaa 100755 --- a/cloud-init.py +++ b/cloud-init.py @@ -93,7 +93,10 @@ def main(): # but we want 'start' to benefit from a cache if # a previous start-local populated one if cmd == "start-local": - cloudinit.purge_cache() + manclean = util.get_cfg_option_bool(cfg, 'manual_cache_clean',False) + if manclean: + log.debug("not purging cache, manual_cache_clean = True") + cloudinit.purge_cache(not manclean) cloud = cloudinit.CloudInit(ds_deps=deps[cmd]) |