Uci fails on symlink?

I symlinked ln -s configurations into ram:

lrwxrwxrwx    1 root     root            15 Jan  8 20:31 babeld -> /var/run/babeld
lrwxrwxrwx    1 root     root            14 Jan  8 20:31 olsrd -> /var/run/olsrd

However, if I do now:

root@xxx:/etc/config# uci add babeld interface
root@xxx:/etc/config# uci set babeld.@interface[-1].ifname="wg_51234"
root@xxx:/etc/config# uci commit
uci: I/O error

What's wrong?


Probably related:

Just running debug and adding some debug output, will lead in a lot of errors:

diff --git a/util.c b/util.c
index 61e42cd..709b92e 100644
--- a/util.c
+++ b/util.c
@@ -211,6 +211,8 @@ __private FILE *uci_open_stream(struct uci_context *ctx, const char *filename, c
        if (!write && ((stat(filename, &statbuf) < 0) ||
                ((statbuf.st_mode & S_IFMT) != S_IFREG))) {
+               fprintf(stderr, "Filename: %s\n", filename);
+               fprintf(stderr, "statbuf: %d\n", statbuf.st_mode);
                UCI_THROW(ctx, UCI_ERR_NOTFOUND);

Filename: /tmp/.uci/dropbear
statbuf: 0
Exception: UCI_ERR_NOTFOUND in uci_open_stream, uci-2021-10-22-f84f49f0/util.c:216
Exception: UCI_ERR_IO in uci_open_stream, uci-2021-10-22-f84f49f0/util.c:241

I found a solution:

However, it feels more like a workaround.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.