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.
This commit is contained in:
Thomas Hervé 2012-09-05 16:40:10 -04:00 committed by Scott Moser
commit bbe57f4a3d

View File

@ -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):
"""