index 409343fa1f0c33f449ccd969d4155654618e43b3..ebe5dbd6468821d929a43d31d5e53178069063af 100644 (file)
sdb_puppet_stcfg_config_conn(oconfig_item_t *ci)
{
char *name = NULL;
- char cb_name[1024];
sdb_object_t *user_data;
sdb_dbi_client_t *client;
return -1;
}
- snprintf(cb_name, sizeof(cb_name), "puppet::storeconfigs::%s", name);
- cb_name[sizeof(cb_name) - 1] = '\0';
-
client = sdb_dbi_client_create(driver, database);
if (! client) {
char errbuf[1024];
return -1;
}
- sdb_plugin_register_init(cb_name, sdb_puppet_stcfg_init, user_data);
- sdb_plugin_register_shutdown(cb_name, sdb_puppet_stcfg_shutdown,
+ sdb_plugin_register_init(name, sdb_puppet_stcfg_init, user_data);
+ sdb_plugin_register_shutdown(name, sdb_puppet_stcfg_shutdown,
user_data);
- sdb_plugin_register_collector(cb_name, sdb_puppet_stcfg_collect,
+ sdb_plugin_register_collector(name, sdb_puppet_stcfg_collect,
/* interval */ NULL, user_data);
/* pass control to the list */
int
sdb_module_init(sdb_plugin_info_t *info)
{
- sdb_plugin_set_info(info, SDB_PLUGIN_INFO_NAME, "puppet::store-configs");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_DESC,
"backend accessing the Puppet stored configuration database");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_COPYRIGHT,