Create audit and repair cfg at startup
If those files don't exist, create them at startup. Else adding the first audit or repair script fails because the cfg file doesn't exist. Change-Id: I9143f59364167e98f69616351b4ac1df8ebd4ff8
This commit is contained in:
parent
b2ea4abbdb
commit
1d38e2ca2b
|
@ -101,6 +101,14 @@ def start_engine(args):
|
|||
}
|
||||
}
|
||||
utils.write_yaml(cfg, engine_cfg)
|
||||
# create cfg files
|
||||
for filename in ['audit_cfg', 'repair_cfg']:
|
||||
try:
|
||||
with open(cfg_data[filename]):
|
||||
pass
|
||||
except IOError:
|
||||
with open(cfg_data[filename], 'a'):
|
||||
pass
|
||||
LOG.info('Added %s to engine cfg', args.name)
|
||||
entropy_engine = Engine(args.name, **cfg_data)
|
||||
entropy_engine.run()
|
||||
|
|
Loading…
Reference in New Issue