Merge pull request #354 from apwiggins/frr-service-reset-interfaces
added reset interfaces at FRR startup
This commit is contained in:
commit
9216683902
1 changed files with 7 additions and 1 deletions
|
@ -131,7 +131,7 @@ class FRRZebra(CoreService):
|
||||||
frr_sbin_search = node.session.options.get_config(
|
frr_sbin_search = node.session.options.get_config(
|
||||||
"frr_sbin_search", default='"/usr/local/sbin /usr/sbin /usr/lib/frr"'
|
"frr_sbin_search", default='"/usr/local/sbin /usr/sbin /usr/lib/frr"'
|
||||||
)
|
)
|
||||||
return """\
|
cfg = """\
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# auto-generated by zebra service (frr.py)
|
# auto-generated by zebra service (frr.py)
|
||||||
FRR_CONF=%s
|
FRR_CONF=%s
|
||||||
|
@ -225,6 +225,7 @@ if [ "$1" != "zebra" ]; then
|
||||||
echo "WARNING: '$1': all FRR daemons are launched by the 'zebra' service!"
|
echo "WARNING: '$1': all FRR daemons are launched by the 'zebra' service!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
confcheck
|
confcheck
|
||||||
bootfrr
|
bootfrr
|
||||||
""" % (
|
""" % (
|
||||||
|
@ -233,6 +234,11 @@ bootfrr
|
||||||
frr_bin_search,
|
frr_bin_search,
|
||||||
constants.FRR_STATE_DIR,
|
constants.FRR_STATE_DIR,
|
||||||
)
|
)
|
||||||
|
for ifc in node.netifs():
|
||||||
|
cfg += f"ip link set dev {ifc.name} down\n"
|
||||||
|
cfg += "sleep 1\n"
|
||||||
|
cfg += f"ip link set dev {ifc.name} up\n"
|
||||||
|
return cfg
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def generateFrrDaemons(cls, node):
|
def generateFrrDaemons(cls, node):
|
||||||
|
|
Loading…
Add table
Reference in a new issue