From c83c236f6a0a1a5299376e40db57e7b7527cbac7 Mon Sep 17 00:00:00 2001 From: Steve Vinoski Date: Fri, 20 Sep 2013 14:23:35 -0400 Subject: [snmp/agent] enable SNMP to create missing database directories Add {db_init_error, create_db_and_dir} option to SNMP manager and agent. This allows them to create any missing parent directories for db_dir, rather than treating any missing directories as a fatal error. The default for db_init_error, which is terminate, is unchanged. Add create_db_and_dir to the documentation. Add new tests to verify that using create_db_and_dir results in missing parent directories being created. --- lib/snmp/src/agent/snmpa_supervisor.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/snmp/src/agent/snmpa_supervisor.erl') diff --git a/lib/snmp/src/agent/snmpa_supervisor.erl b/lib/snmp/src/agent/snmpa_supervisor.erl index aebcdbaa84..77ed54bee4 100644 --- a/lib/snmp/src/agent/snmpa_supervisor.erl +++ b/lib/snmp/src/agent/snmpa_supervisor.erl @@ -356,7 +356,7 @@ init([AgentType, Opts]) -> SymStoreSpec = worker_spec(snmpa_symbolic_store, SymStoreArgs, Restart, 2000), - LdbArgs = [Prio, DbDir, LdbOpts], + LdbArgs = [Prio, DbDir, DbInitError, LdbOpts], LocalDbSpec = worker_spec(snmpa_local_db, LdbArgs, Restart, 5000), -- cgit v1.2.3