Skip to content

Commit a052298

Browse files
Fix indentation, should be tabs by convention
1 parent 25530d5 commit a052298

1 file changed

Lines changed: 39 additions & 39 deletions

File tree

third_party/openthread-br/files/otbr-agent.init

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -22,53 +22,53 @@ RCP_PROG=/usr/sbin/otbr-rcp
2222

2323
validate_section_otbr()
2424
{
25-
uci_load_validate otbr-agent otbr-agent "$1" "$2" \
26-
'thread_if_name:string' \
27-
'infra_if_name:string' \
28-
'uart_device:string:any' \
29-
'uart_baudrate:uinteger:0' \
30-
'uart_flow_control:bool:1' \
31-
'rcp_hotplug:bool:1' \
32-
'rcp_firmware_update:bool:1'
25+
uci_load_validate otbr-agent otbr-agent "$1" "$2" \
26+
'thread_if_name:string' \
27+
'infra_if_name:string' \
28+
'uart_device:string:any' \
29+
'uart_baudrate:uinteger:0' \
30+
'uart_flow_control:bool:1' \
31+
'rcp_hotplug:bool:1' \
32+
'rcp_firmware_update:bool:1'
3333
}
3434

3535
otbr_instance()
3636
{
37-
local cfg="$1"
38-
if [ "$2" != 0 ]; then
39-
echo "validation failed"
40-
return 1
41-
fi
42-
if [ -z "$infra_if_name" ]; then
43-
echo "missing infra_if_name"
44-
return 1
45-
fi
37+
local cfg="$1"
38+
if [ "$2" != 0 ]; then
39+
echo "validation failed"
40+
return 1
41+
fi
42+
if [ -z "$infra_if_name" ]; then
43+
echo "missing infra_if_name"
44+
return 1
45+
fi
4646

47-
local radio_url
48-
if [ "${uart_device#/dev/}" != "${uart_device}" ]; then
49-
# Directly run otbr-agent with the specified /dev/* device
50-
set -- "$AGENT_PROG"
51-
radio_url="spinel+hdlc+uart://${uart_device}"
52-
else
53-
# Use the otbr-rcp wrapper to locate the device
54-
set -- "$RCP_PROG"
55-
[ "$rcp_hotplug" -eq 0 ] || set -- "$@" --wait
56-
[ "$rcp_firmware_update" -eq 0 ] || set -- "$@" --update
57-
set -- "$@" "$uart_device" --
58-
radio_url="%rcpurl%"
59-
fi
60-
radio_url="${radio_url}?uart-exclusive"
61-
[ "$uart_baudrate" -eq 0 ] || radio_url="${radio_url}&uart-baudrate=${uart_baudrate}"
62-
[ "$uart_flow_control" -eq 0 ] || radio_url="${radio_url}&uart-flow-control"
47+
local radio_url
48+
if [ "${uart_device#/dev/}" != "${uart_device}" ]; then
49+
# Directly run otbr-agent with the specified /dev/* device
50+
set -- "$AGENT_PROG"
51+
radio_url="spinel+hdlc+uart://${uart_device}"
52+
else
53+
# Use the otbr-rcp wrapper to locate the device
54+
set -- "$RCP_PROG"
55+
[ "$rcp_hotplug" -eq 0 ] || set -- "$@" --wait
56+
[ "$rcp_firmware_update" -eq 0 ] || set -- "$@" --update
57+
set -- "$@" "$uart_device" --
58+
radio_url="%rcpurl%"
59+
fi
60+
radio_url="${radio_url}?uart-exclusive"
61+
[ "$uart_baudrate" -eq 0 ] || radio_url="${radio_url}&uart-baudrate=${uart_baudrate}"
62+
[ "$uart_flow_control" -eq 0 ] || radio_url="${radio_url}&uart-flow-control"
6363

64-
procd_open_instance
65-
procd_set_param command "$@" -I "${thread_if_name:-$cfg}" -B "$infra_if_name" "${radio_url}" "trel://${infra_if_name}"
66-
procd_set_param respawn
67-
procd_close_instance
64+
procd_open_instance
65+
procd_set_param command "$@" -I "${thread_if_name:-$cfg}" -B "$infra_if_name" "${radio_url}" "trel://${infra_if_name}"
66+
procd_set_param respawn
67+
procd_close_instance
6868
}
6969

7070
start_service()
7171
{
72-
config_load otbr-agent
73-
config_foreach validate_section_otbr otbr-agent otbr_instance
72+
config_load otbr-agent
73+
config_foreach validate_section_otbr otbr-agent otbr_instance
7474
}

0 commit comments

Comments
 (0)