From: Donald Sharp Date: Tue, 8 May 2018 12:12:41 +0000 (-0400) Subject: staticd: Enable backup config X-Git-Tag: frr-6.1-dev~86^2~10 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ad3489a0d2c0eabcb5dd5c992c624864230f9231;p=matthieu%2Ffrr.git staticd: Enable backup config When the user is not using the integrated config and has upgraded to a version of FRR with staticd, that probably means that static routes are stored in zebra.conf. Take advantage of the backup backup config option and read those in. Signed-off-by: Donald Sharp --- diff --git a/staticd/static_main.c b/staticd/static_main.c index 7da526cefd..842de6af46 100644 --- a/staticd/static_main.c +++ b/staticd/static_main.c @@ -36,6 +36,8 @@ #include "static_routes.h" #include "static_zebra.h" +char backup_config_file[256]; + bool mpls_enabled; zebra_capabilities_t _caps_p[] = { @@ -137,6 +139,10 @@ int main(int argc, char **argv, char **envp) static_zebra_init(); static_vty_init(); + snprintf(backup_config_file, sizeof(backup_config_file), + "%s/zebra.conf", frr_sysconfdir); + staticd_di.backup_config_file = backup_config_file; + frr_config_fork(); frr_run(master);