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/doc/src/snmp_app.xml | 7 +++++--
lib/snmp/doc/src/snmp_config.xml | 9 ++++++---
2 files changed, 11 insertions(+), 5 deletions(-)
(limited to 'lib/snmp/doc')
diff --git a/lib/snmp/doc/src/snmp_app.xml b/lib/snmp/doc/src/snmp_app.xml
index e5a05342c1..9ede75b943 100644
--- a/lib/snmp/doc/src/snmp_app.xml
+++ b/lib/snmp/doc/src/snmp_app.xml
@@ -763,12 +763,15 @@
- db_init_error() = terminate | create
+ db_init_error() = terminate | create | create_db_and_dir
-
Defines what to do if the agent or manager is unable to open an
existing database file. terminate means that the
agent/manager will terminate and create means that the
- agent/manager will remove the faulty file(s) and create new ones.
+ agent/manager will remove the faulty file(s) and create new ones,
+ and create_db_and_dir means that the agent/manager will
+ create the database file along with any missing parent directories
+ for the database file.
Default is terminate.
diff --git a/lib/snmp/doc/src/snmp_config.xml b/lib/snmp/doc/src/snmp_config.xml
index 61ee7f00ee..30b46e6aa8 100644
--- a/lib/snmp/doc/src/snmp_config.xml
+++ b/lib/snmp/doc/src/snmp_config.xml
@@ -792,12 +792,15 @@ in so far as it will be converted to the new format if found.
- db_init_error() = terminate | create
+ db_init_error() = terminate | create | create_db_and_dir
-
Defines what to do if the agent is unable to open an
existing database file. terminate means that the
- agent/manager will terminate and create means that the
- agent/manager will remove the faulty file(s) and create new ones.
+ agent/manager will terminate, create means that the
+ agent/manager will remove the faulty file(s) and create new ones,
+ and create_db_and_dir means that the agent/manager will
+ create the database file along with any missing parent directories
+ for the database file.
Default is terminate.
--
cgit v1.2.3