]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Fix staticd extension
authorMartin Winter <mwinter@opensourcerouting.org>
Thu, 19 Jul 2018 12:04:38 +0000 (05:04 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:14 +0000 (20:22 -0500)
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>
tests/topotests/lib/topotest.py

index 2d1c2b3c62f1dc568ad5acc943368abcf50c79e9..b8177660486037976801040a8e6e9b6c2ec7fb9f 100644 (file)
@@ -632,18 +632,13 @@ class Router(Node):
             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