Add support for symlinks
Change-Id: Ic37f8e00a53642501aa9c7ae108e819d7d8cf3c0
This commit is contained in:
parent
ab4d973e47
commit
7cd5ca9cbd
@ -94,6 +94,13 @@ class OpenStackSnap(object):
|
||||
LOG.debug('Creating directory {}'.format(dir_name))
|
||||
os.makedirs(dir_name, 0o750)
|
||||
|
||||
for link_target in setup['symlinks']:
|
||||
link = setup['symlinks'][link_target]
|
||||
target = link_target.format(**self.snap_env)
|
||||
if not os.path.exists(link):
|
||||
LOG.debug('Creating symlink {} to {}'.format(link, target))
|
||||
os.symlink(target, link)
|
||||
|
||||
for template in setup['templates']:
|
||||
target = setup['templates'][template]
|
||||
target_file = target.format(**self.snap_env)
|
||||
|
Loading…
Reference in New Issue
Block a user