openthread-br: fix build error on some platforms
authorkrant <aleksey.vasilenko@gmail.com>
Tue, 27 Feb 2024 10:31:02 +0000 (12:31 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Tue, 27 Feb 2024 21:45:41 +0000 (23:45 +0200)
On some builders the package was failing to build:
```
cp: cannot overwrite non-directory '[..]/var' with directory '[..]/var
```

Here we're moving the creation of /var/lib/thread into runtime script,
which eliminates the error.

Signed-off-by: krant <aleksey.vasilenko@gmail.com>
net/openthread-br/Makefile
net/openthread-br/files/openthread-proto.sh

index 1b42cceee555b4e7d1012fafd6abe428c6bec675..35c3b969dd4524ca71f861534ec14f8d79ece4c5 100644 (file)
@@ -96,8 +96,7 @@ define Package/openthread-br/install
        $(INSTALL_DIR) \
                $(1)/etc/init.d \
                $(1)/lib/netifd/proto \
-               $(1)/usr/sbin \
-               $(1)/var/lib/thread
+               $(1)/usr/sbin
        $(INSTALL_BIN) ./files/openthread-proto.sh $(1)/lib/netifd/proto/openthread.sh
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
 endef
index 928bafe71285d983602d1ff8266c7899cb007b04..360786aaf88031e7ce46d1d5e34020be05f3c838 100644 (file)
@@ -88,6 +88,7 @@ proto_openthread_setup() {
        }
 
        json_for_each_item proto_openthread_add_prefix prefix
+       mkdir -p /var/lib/thread
        ubus call otbr threadstart || proto_openthread_setup_error "$interface" MISSING_UBUS_OBJ
        $OTCTL netdata register