mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 10:51:55 +00:00
openthread-br: create state dir before starting
If the directory is missing, otbr-agent will fail to start, and it's not immediately clear from the logs why: netifd: Interface 'thread' is setting up now : [NOTE]-AGENT---: Backbone interface: br-iot otbr-agent[5682]: [NOTE]-AGENT---: Running 0.3.0 otbr-agent[5682]: [NOTE]-AGENT---: Thread version: 1.4.0 otbr-agent[5682]: [NOTE]-AGENT---: Thread interface: wpan0 otbr-agent[5682]: [NOTE]-AGENT---: Radio URL: spinel+hdlc_uart:///dev/ttyS1?uart-baudrate=921600 otbr-agent[5682]: [NOTE]-AGENT---: Radio URL: trel://br-iot otbr-agent[5682]: [NOTE]-ILS-----: Infra link selected: br-iot otbr-agent[5682]: [INFO]-RCP_HOS-: OpenThread log level changed to 4 otbr-agent[5682]: 49d.17:03:10.822 [I] P-SpinelDrive-: co-processor reset: RESET_POWER_ON otbr-agent[5682]: 49d.17:03:10.822 [C] P-SpinelDrive-: Software reset co-processor successfully otbr-agent[5682]: 49d.17:03:10.825 [C] Platform------: Init() at settings_file.cpp:65: No such file or directory netifd: thread (5684): Command failed: Not found netifd: Interface 'thread' is now down Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
@@ -59,6 +59,8 @@ proto_openthread_setup() {
|
|||||||
interface="$1"
|
interface="$1"
|
||||||
device="$2"
|
device="$2"
|
||||||
|
|
||||||
|
mkdir -p /var/lib/thread
|
||||||
|
|
||||||
json_get_vars backbone_network dataset device radio_url verbose:0
|
json_get_vars backbone_network dataset device radio_url verbose:0
|
||||||
|
|
||||||
[ -n "$backbone_network" ] || proto_openthread_setup_error "$interface" MISSING_BACKBONE_NETWORK
|
[ -n "$backbone_network" ] || proto_openthread_setup_error "$interface" MISSING_BACKBONE_NETWORK
|
||||||
@@ -88,7 +90,6 @@ proto_openthread_setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
json_for_each_item proto_openthread_add_prefix prefix
|
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
|
ubus call otbr threadstart || proto_openthread_setup_error "$interface" MISSING_UBUS_OBJ
|
||||||
$OTCTL netdata register
|
$OTCTL netdata register
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user