rename 'datadir' key to 'data' in pathmap

This commit is contained in:
Scott Moser 2011-02-07 14:36:33 -05:00
parent 2dff0d2afd
commit d3c716b53c
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ def handle(name,cfg,cloud,log,args):
try:
hostname = util.get_cfg_option_str(cfg,"hostname",cloud.get_hostname())
prev ="%s/%s" % (cloud.get_cpath('datadir'),"previous-hostname")
prev ="%s/%s" % (cloud.get_cpath('data'),"previous-hostname")
update_hostname(hostname, prev, log)
except Exception as e:
log.warn("failed to set hostname\n")

View File

@ -42,7 +42,7 @@ pathmap = {
"userdata" : "/user-data.txt.i",
"obj_pkl" : "/obj.pkl",
"cloud_config" : "/cloud-config.txt",
"datadir" : "/data",
"data" : "/data",
None : "",
}
@ -219,7 +219,7 @@ class CloudInit:
util.ensure_dirs(dlist)
ds = "%s: %s\n" % ( self.datasource.__class__, str(self.datasource) )
dp = self.get_cpath('datadir')
dp = self.get_cpath('data')
util.write_file("%s/%s" % (idir, 'datasource'), ds)
util.write_file("%s/%s" % (dp, 'previous-datasource'), ds)
util.write_file("%s/%s" % (dp, 'previous-instance-id'), "%s\n" % iid)