]> git.puffer.fish Git - mirror/frr.git/commitdiff
tools: fix frr-reload.py daemon option 6581/head
authorEmanuele Di Pascale <emanuele@voltanet.io>
Mon, 15 Jun 2020 12:44:05 +0000 (14:44 +0200)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Mon, 15 Jun 2020 12:58:22 +0000 (14:58 +0200)
the refactored frr-reload.py is adding 'no-header' to the
'show running' command of vtysh, but if a daemon is specified
the no-header option should only be added after the daemon name.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
tools/frr-reload.py

index bdba65ee2ff5df2595841b3cbce90e6b90bbef2c..151db6e4f78c13459be055ee58898f96044dc056 100755 (executable)
@@ -146,9 +146,10 @@ class Vtysh(object):
         return stdout.decode('UTF-8')
 
     def mark_show_run(self, daemon = None):
-        cmd = 'show running-config no-header'
+        cmd = 'show running-config'
         if daemon:
             cmd += ' %s' % daemon
+        cmd += ' no-header'
         show_run = self._call_cmd(cmd, stdout=subprocess.PIPE)
         mark = self._call(['-m', '-f', '-'], stdin=show_run.stdout, stdout=subprocess.PIPE)