Browse Source

[2133] Provide reasonable default for data_sources

Include the default sqlite3 database as well. This is easier than
documenting everything and it would just work.
Michal 'vorner' Vaner 13 years ago
parent
commit
8a9addc70d
2 changed files with 9 additions and 1 deletions
  1. 1 1
      src/bin/cfgmgr/plugins/Makefile.am
  2. 8 0
      src/bin/cfgmgr/plugins/datasrc.spec.pre.in

+ 1 - 1
src/bin/cfgmgr/plugins/Makefile.am

@@ -3,7 +3,7 @@ SUBDIRS = tests
 EXTRA_DIST = README logging.spec tsig_keys.spec
 
 datasrc.spec: datasrc.spec.pre
-	$(SED) -e "s|@@PKGDATADIR@@|$(pkgdatadir)|" datasrc.spec.pre >$@
+	$(SED) -e "s|@@PKGDATADIR@@|$(pkgdatadir)|;s|@@LOCALSTATEDIR@@|$(localstatedir)|" datasrc.spec.pre >$@
 
 config_plugindir = @prefix@/share/@PACKAGE@/config_plugins
 config_plugin_DATA = logging.spec tsig_keys.spec datasrc.spec

+ 8 - 0
src/bin/cfgmgr/plugins/datasrc.spec.pre.in

@@ -8,6 +8,14 @@
                 "item_type": "named_set",
                 "item_optional": false,
                 "item_default": {
+                    "IN": [
+                        {
+                            "type": "sqlite3",
+                            "params": {
+                                "database_file": "@@LOCALSTATEDIR@@/@PACKAGE@/zone.sqlite3"
+                            }
+                        }
+                    ],
                     "CH": [
                         {
                             "type": "static",