mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 03:28:31 +00:00
lib: Fix staticd extension
Do not provide a staticd.conf to force staticd to read it's config from zebra.conf Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
This commit is contained in:
parent
a2a1134c77
commit
2c805e6cf6
@ -632,18 +632,13 @@ class Router(Node):
|
|||||||
self.waitOutput()
|
self.waitOutput()
|
||||||
self.cmd('chown %s:%s /etc/%s/%s.conf' % (self.routertype, self.routertype, self.routertype, daemon))
|
self.cmd('chown %s:%s /etc/%s/%s.conf' % (self.routertype, self.routertype, self.routertype, daemon))
|
||||||
self.waitOutput()
|
self.waitOutput()
|
||||||
if daemon == 'zebra':
|
if (daemon == 'zebra') and (self.daemons['staticd'] == 0):
|
||||||
# Add staticd with zebra - if it exists
|
# Add staticd with zebra - if it exists
|
||||||
staticd_path = os.path.join(self.daemondir, 'staticd')
|
staticd_path = os.path.join(self.daemondir, 'staticd')
|
||||||
if os.path.isfile(staticd_path):
|
if os.path.isfile(staticd_path):
|
||||||
self.daemons['staticd'] = 1
|
self.daemons['staticd'] = 1
|
||||||
self.daemons_options['staticd'] = None
|
self.daemons_options['staticd'] = ''
|
||||||
self.cmd('touch /etc/%s/%s.conf' % (self.routertype, 'staticd'))
|
# Auto-Started staticd has no config, so it will read from zebra config
|
||||||
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()
|
|
||||||
else:
|
else:
|
||||||
logger.info('No daemon {} known'.format(daemon))
|
logger.info('No daemon {} known'.format(daemon))
|
||||||
# print "Daemons after:", self.daemons
|
# print "Daemons after:", self.daemons
|
||||||
|
Loading…
Reference in New Issue
Block a user