diff options
author | Dinesh G Dutt <ddutt@cumulusnetworks.com> | 2017-01-06 03:49:13 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-01-30 19:40:40 +0100 |
commit | 4b78098d79d97abef352345221c3979efab1c373 (patch) | |
tree | 7dca2f3dbfa2da1dcbe24cab06d2a4f24dd2679e /tools | |
parent | bgpd, zebra: Fix for ignored non-default VRF single-hop BFD status messages i... (diff) | |
download | frr-4b78098d79d97abef352345221c3979efab1c373.tar.xz frr-4b78098d79d97abef352345221c3979efab1c373.zip |
tools: Don't overwrite Quagga.conf on reload, unless user specified.
Ticket: CM-14059
Reviewed By: CCR-5524
Testing Done: the usual
At some point in the 3.x release cycle, it was decided to overwrite the
user's Quagga.conf configuration file with the output of running config
when the user did a quagga reload. This is problematic for several reasons
such as: losing user-specified comments, upsetting network automation
scripts which think some thing has changed all the time from the specified
config etc.
This patch fixes this issue by not overwriting the Quagga.conf file unless
the user specifies it via an additional option, or the file being used as
input to quagga reload isn't the default configuration file (incl. path).
Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/frr-reload.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py index e14d78d54..729f817d6 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -732,6 +732,7 @@ if __name__ == '__main__': parser.add_argument('--debug', action='store_true', help='Enable debugs', default=False) parser.add_argument('--stdout', action='store_true', help='Log to STDOUT', default=False) parser.add_argument('filename', help='Location of new frr config file') + parser.add_argument('--overwrite', action='store_true', help='Overwrite Quagga.conf with running config output', default=False) args = parser.parse_args() # Logging @@ -939,5 +940,6 @@ if __name__ == '__main__': subprocess.call(['/usr/bin/vtysh', '-f', filename]) os.unlink(filename) - # Make these changes persistent + # Make these changes persistent + if args.overwrite or args.filename != '/etc/quagga/Quagga.conf': subprocess.call(['/usr/bin/vtysh', '-c', 'write']) |