uci_file_commit() tries to open and lock a package file (e.g.
/etc/config/system)
before writing into. When the package file doesn't exist, uci fails with
'Entry not found'.
UCI_THROW(ctx, UCI_ERR_IO);
/* open the config file for writing now, so that it is locked */
- f1 = uci_open_stream(ctx, p->path, SEEK_SET, false, false);
+ f1 = uci_open_stream(ctx, p->path, SEEK_SET, true, true);
/* flush unsaved changes and reload from delta file */
UCI_TRAP_SAVE(ctx, done);