mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 11:24:24 +00:00
'service quagga reload' fails if /etc/quagga/vtysh.conf does not exist
Ticket: CM-7146 Reviewed By: teo@cumulusnetworks.com Testing Done: /usr/lib/quagga/quagga-reload.py needs to check that /etc/quagga/vtysh.conf exists before trying to open it
This commit is contained in:
parent
ca3faf4e08
commit
f850d14d66
@ -468,16 +468,16 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# Verify that 'service integrated-vtysh-config' is configured
|
# Verify that 'service integrated-vtysh-config' is configured
|
||||||
vtysh_filename = '/etc/quagga/vtysh.conf'
|
vtysh_filename = '/etc/quagga/vtysh.conf'
|
||||||
fh = open(vtysh_filename, 'r')
|
|
||||||
service_integrated_vtysh_config = False
|
service_integrated_vtysh_config = False
|
||||||
|
|
||||||
|
if os.path.isfile(vtysh_filename):
|
||||||
|
with open(vtysh_filename, 'r') as fh:
|
||||||
for line in fh.readlines():
|
for line in fh.readlines():
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
|
||||||
if line == 'service integrated-vtysh-config':
|
if line == 'service integrated-vtysh-config':
|
||||||
service_integrated_vtysh_config = True
|
service_integrated_vtysh_config = True
|
||||||
break
|
break
|
||||||
fh.close()
|
|
||||||
|
|
||||||
if not service_integrated_vtysh_config:
|
if not service_integrated_vtysh_config:
|
||||||
print "'service integrated-vtysh-config' is not configured, this is required for 'service quagga reload'"
|
print "'service integrated-vtysh-config' is not configured, this is required for 'service quagga reload'"
|
||||||
|
Loading…
Reference in New Issue
Block a user