summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hervé <thomas@canonical.com>2012-09-05 16:40:10 -0400
committerScott Moser <smoser@ubuntu.com>2012-09-05 16:40:10 -0400
commit1d239f9beec5d556e4551c684f551843c5553997 (patch)
treec078040eb2926b0e87d5b95060a2d9bac9791822
parent3a35daa68ca7e6214be3f9c1e33a1cdde5f60eb4 (diff)
parentf72512d8387b93eaf9c5bb7956361ad16e40376e (diff)
downloadvyos-cloud-init-1d239f9beec5d556e4551c684f551843c5553997.tar.gz
vyos-cloud-init-1d239f9beec5d556e4551c684f551843c5553997.zip
add 'RUN=1' to /etc/default/landscape-client
This modifies /etc/default/landscape-client to have 'RUN=1' if and only if the cloud-config (user-data or local) was non-empty. LP: #1042758
-rw-r--r--cloudinit/config/cc_landscape.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/config/cc_landscape.py b/cloudinit/config/cc_landscape.py
index 906a6ff7..d351d941 100644
--- a/cloudinit/config/cc_landscape.py
+++ b/cloudinit/config/cc_landscape.py
@@ -31,6 +31,7 @@ from cloudinit.settings import PER_INSTANCE
frequency = PER_INSTANCE
LSC_CLIENT_CFG_FILE = "/etc/landscape/client.conf"
+LS_DEFAULT_FILE = "/etc/default/landscape-client"
distros = ['ubuntu']
@@ -78,6 +79,8 @@ def handle(_name, cfg, cloud, log, _args):
util.write_file(lsc_client_fn, contents.getvalue())
log.debug("Wrote landscape config file to %s", lsc_client_fn)
+ util.write_file(LS_DEFAULT_FILE, "RUN=1\n")
+
def merge_together(objs):
"""