Skip to content

Commit

Permalink
Merge pull request #109 from opensourcerouting/staticd2
Browse files Browse the repository at this point in the history
lib: Fix staticd extension
  • Loading branch information
mwinter-osr authored Jul 19, 2018
2 parents 0f8c025 + eb0f4c4 commit efd112e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/topotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,18 +632,13 @@ def loadConf(self, daemon, source=None, param=None):
self.waitOutput()
self.cmd('chown %s:%s /etc/%s/%s.conf' % (self.routertype, self.routertype, self.routertype, daemon))
self.waitOutput()
if daemon == 'zebra':
if (daemon == 'zebra') and (self.daemons['staticd'] == 0):
# Add staticd with zebra - if it exists
staticd_path = os.path.join(self.daemondir, 'staticd')
if os.path.isfile(staticd_path):
self.daemons['staticd'] = 1
self.daemons_options['staticd'] = None
self.cmd('touch /etc/%s/%s.conf' % (self.routertype, 'staticd'))
self.waitOutput()
self.cmd('chmod 640 /etc/%s/%s.conf' % (self.routertype, 'staticd'))
self.waitOutput()
self.cmd('chown %s:%s /etc/%s/%s.conf' % (self.routertype, self.routertype, self.routertype, 'staticd'))
self.waitOutput()
self.daemons_options['staticd'] = ''
# Auto-Started staticd has no config, so it will read from zebra config
else:
logger.info('No daemon {} known'.format(daemon))
# print "Daemons after:", self.daemons
Expand Down

0 comments on commit efd112e

Please sign in to comment.