- opt = uci_lookup_option(ctx, sct, key);
- if (opt != NULL) {
- memset(&ptr, 0, sizeof(ptr));
- ptr.package = pkg->e.name;
- ptr.section = sct->e.name;
- ptr.option = key;
-
- if (uci_lookup_ptr(ctx, &ptr, NULL, false) == UCI_OK) {
- ptr.value = value;
- uci_set(ctx, &ptr);
- save = true;
- }
+ memset(&ptr, 0, sizeof(ptr));
+ ptr.package = pkg->e.name;
+ ptr.section = sct->e.name;
+ ptr.option = key;
+
+ if (uci_lookup_ptr(ctx, &ptr, NULL, false) == UCI_OK) {
+ ptr.value = value;
+ uci_set(ctx, &ptr);
+ uci_save(ctx, pkg);
+ ret_val = true;
+ log_debug("Created configuration section %s to configuration file: %s\n", section_name, fname);