summaryrefslogtreecommitdiff
path: root/tools/frr-reload.py
diff options
context:
space:
mode:
authorEmanuele Di Pascale <emanuele@voltanet.io>2020-06-15 14:44:05 +0200
committerEmanuele Di Pascale <emanuele@voltanet.io>2020-06-15 14:58:22 +0200
commit7e7fedcb40f12d25c51ac29fd2a387936e0bef7c (patch)
tree5a96bc3f570095700b8c774d5eb377924bd60c9e /tools/frr-reload.py
parent1a5fc72066daf409d7470d4c4c34d979efd94ca0 (diff)
tools: fix frr-reload.py daemon option
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>
Diffstat (limited to 'tools/frr-reload.py')
-rwxr-xr-xtools/frr-reload.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py
index bdba65ee2f..151db6e4f7 100755
--- a/tools/frr-reload.py
+++ b/tools/frr-reload.py
@@ -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)