+
+ uci_set_confdir(ctx, dir);
+ ULOG_INFO("attempting to load %s/%s\n", dir, file);
+
+ if (uci_load(ctx, file, &pkg)) {
+ uci_get_errorstr(ctx, &err, file);
+ ULOG_ERR("unable to load configuration (%s)\n", err);
+
+ free(err);
+ return NULL;
+ }
+
+ return pkg;
+}
+
+static int config_load(char *cfg)
+{
+ struct uci_context *ctx = uci_alloc_context();
+ struct uci_package *pkg = NULL;