summaryrefslogtreecommitdiff
path: root/staticd/static_main.c
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2023-04-04 08:42:04 -0500
committerGitHub <noreply@github.com>2023-04-04 08:42:04 -0500
commit3b28a5ef6b9b7296196f5f65de493668307be5cb (patch)
tree44e4a1d21e4840034ce285740dbe17e92f2841b9 /staticd/static_main.c
parent4af5e39b2ca3c3dc3a96c701bbcd0d3c87baecaf (diff)
parent8033bf3976d85c84f00a3ab320eca5fc8418d756 (diff)
Merge pull request #13131 from LabNConsulting/chopps/no-startup-file
mgmtd: remove startup config feature for now
Diffstat (limited to 'staticd/static_main.c')
-rw-r--r--staticd/static_main.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/staticd/static_main.c b/staticd/static_main.c
index 09f22318ff..9809d9751a 100644
--- a/staticd/static_main.c
+++ b/staticd/static_main.c
@@ -161,6 +161,10 @@ static const struct frr_yang_module_info *const staticd_yang_modules[] = {
#define STATIC_VTY_PORT 2616
+/*
+ * NOTE: .flags == FRR_NO_SPLIT_CONFIG to avoid reading split config, mgmtd will
+ * do this for us now
+ */
FRR_DAEMON_INFO(staticd, STATIC, .vty_port = STATIC_VTY_PORT,
.proghelp = "Implementation of STATIC.",
@@ -170,7 +174,8 @@ FRR_DAEMON_INFO(staticd, STATIC, .vty_port = STATIC_VTY_PORT,
.privs = &static_privs, .yang_modules = staticd_yang_modules,
.n_yang_modules = array_size(staticd_yang_modules),
-);
+
+ .flags = FRR_NO_SPLIT_CONFIG);
int main(int argc, char **argv, char **envp)
{
@@ -210,9 +215,12 @@ int main(int argc, char **argv, char **envp)
routing_control_plane_protocols_register_vrf_dependency();
- snprintf(backup_config_file, sizeof(backup_config_file),
- "%s/zebra.conf", frr_sysconfdir);
- staticd_di.backup_config_file = backup_config_file;
+ /*
+ * We set FRR_NO_SPLIT_CONFIG flag to avoid reading our config, but we
+ * still need to write one if vtysh tells us to. Setting the host
+ * config filename does this.
+ */
+ host_config_set(config_default);
frr_config_fork();
frr_run(master);