aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorStephen Hurd <shurd@freebsd.org>2025-08-29 20:01:58 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2025-08-29 20:45:23 +0000
commit40652f86b5ef17c9016a5eaf4bc89b2f324540e8 (patch)
treedb4e1221312e6d3795aab080fc7ea6b89d5611a8 /libexec
parent9e8c1ab0976c9a645a92ae45ad531ada3e4e6701 (diff)
Diffstat (limited to 'libexec')
-rwxr-xr-xlibexec/rc/rc.d/bluetooth13
1 files changed, 11 insertions, 2 deletions
diff --git a/libexec/rc/rc.d/bluetooth b/libexec/rc/rc.d/bluetooth
index 22bd5078034d..239944c73dd6 100755
--- a/libexec/rc/rc.d/bluetooth
+++ b/libexec/rc/rc.d/bluetooth
@@ -127,8 +127,17 @@ bluetooth_setup_stack()
> /dev/null 2>&1 || return 1
# Initilalize HCI node
- ${hccontrol} -n ${dev}hci reset \
- > /dev/null 2>&1 || return 1
+ for loop in 1 2 3
+ do
+ ${hccontrol} -n ${dev}hci reset \
+ > /dev/null 2>1 && break
+ if [ ${loop} -eq 3 ]
+ then
+ warn Reset failed three times, giving up.
+ return 1
+ fi
+ warn Reset failed, retrying.
+ done
${hccontrol} -n ${dev}hci read_bd_addr \
> /dev/null 2>&1 || return 1