[Pkg-bluetooth-maintainers] Bug#755274: Bug#755274: bluez: BT adapter isn't powered on at boot

Nobuhiro Iwamatsu iwamatsu at nigauri.org
Fri Jul 25 19:52:49 UTC 2014


Hi,

Thanks for your report.

2014-07-19 22:20 GMT+09:00 Andriy Martynets <martynets at volia.ua>:
> Package: bluez
> Version: 5.21-1
> Severity: serious
> Justification: Policy 9.1.1
>
> Dear Maintainer,
> The issue appeared after upgrade to version 5.21.
> The udev rule 50-bluetooth-hci-auto-poweron.rules tries to run /usr/bin/hciconfig tool.
> This rule is executed at early stage of boot process (/etc/rcS.d/S02udev) when /usr is mounted later (/etc/rcS.d/S09mountall.sh).
> In my understanding this tool must be installed in /sbin directory as one needed at boot time. Alternatively this must be managed somehow
> at later stage (e.g. 'udevadm trigger --verbose --action=add --subsystem-match=bluetooth --sysname-match=hci*' command in /etc/init.d/bluetooth)
>

I see.
I enabled the hciX in bluetooth.init in earlier versions.
I  will revert this and remove 50-bluetooth-hci-auto-poweron.rules
from bluez package

> I tried the mentioned above udevadm command and it helped. See modified file below. It also contains alterations to fix bug #754830.
>
> Best regards,
> Andriy
>


Best regards,
  Nobuhiro

>
>
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers stable-updates
>   APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 3.14.4 (SMP w/2 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
>
> Versions of packages bluez depends on:
> ii  dbus                 1.8.6-1
> ii  init-system-helpers  1.19
> ii  kmod                 18-1
> ii  libc6                2.19-7
> ii  libdbus-1-3          1.8.6-1
> ii  libglib2.0-0         2.40.0-3
> ii  libreadline6         6.3-6
> ii  libudev1             208-6
> ii  lsb-base             4.1+Debian13
> ii  udev                 208-6
>
> bluez recommends no packages.
>
> bluez suggests no packages.
>
> -- Configuration Files:
> /etc/init.d/bluetooth changed:
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> DESC=bluetooth
> DAEMON=/usr/sbin/bluetoothd
> HCIATTACH=/usr/sbin/hciattach
> HID2HCI_ENABLED=1
> HID2HCI_UNDO=1
> UART_CONF=/etc/bluetooth/uart
> RFCOMM_NAME=rfcomm
> RFCOMM=/usr/bin/$RFCOMM_NAME
> RFCOMM_CONF=/etc/bluetooth/$RFCOMM_NAME.conf
> SDPTOOL=/usr/bin/sdptool
> NOPLUGIN_OPTION=""
> SSD_OPTIONS="--oknodo --quiet --exec $DAEMON -- $NOPLUGIN_OPTION"
> test -f $DAEMON || exit 0
> test -f /etc/default/bluetooth && . /etc/default/bluetooth
> test -f /etc/default/rcS && . /etc/default/rcS
> .. /lib/lsb/init-functions
> set -e
> run_sdptool()
> {
>         # declaring IFS local in this function, removes the need to
>         # save/restore it
>         local IFS o
>         test -x $SDPTOOL || return 1
>         if ! test -z "$SDPTOOL_OPTIONS" ; then
>                 IFS=";"
>                 for o in $SDPTOOL_OPTIONS ; do
>                         #echo "execing $SDPTOOL $o"
>                         IFS=" "
>                         if [ "$VERBOSE" != no ]; then
>                                 $SDPTOOL $o
>                         else
>                                 $SDPTOOL $o >/dev/null 2>&1
>                         fi
>                 done
>         fi
> }
> hci_input()
> {
>     log_progress_msg "switching to HID/HCI no longer done in init script, see /usr/share/doc/bluez/NEWS.Debian.gz" || :
> }
> alias enable_hci_input=hci_input
> alias disable_hci_input=hci_input
> start_uarts()
> {
>         [ -f $HCIATTACH ] && [ -f $UART_CONF ] || return
>         grep -v '^#' $UART_CONF | while read i; do
>                if [ "$VERBOSE" != no ]; then
>                        $HCIATTACH $i
>                else
>                        $HCIATTACH $i >/dev/null 2>&1
>                fi
>         done
> }
> stop_uarts()
> {
>         killall ${HCIATTACH##*/} >/dev/null 2>&1 || :
> }
> start_rfcomm()
> {
>         if [ -x $RFCOMM ] && [ -f $RFCOMM_CONF ] ; then
>                 # rfcomm must always succeed for now: users
>                 # may not yet have an rfcomm-enabled kernel
>                 if [ "$VERBOSE" != no ]; then
>                        log_progress_msg "${RFCOMM##*/}"
>                        $RFCOMM bind all || :
>                 else
>                        $RFCOMM bind all >/dev/null 2>&1 || :
>                 fi
>         fi
> }
> stop_rfcomm()
> {
>         if [ -x $RFCOMM ] ; then
>                if [ "$VERBOSE" != no ]; then
>                        log_progress_msg "${RFCOMM##*/}"
>                        $RFCOMM unbind all || :
>                else
>                        $RFCOMM unbind all >/dev/null 2>&1 || :
>                fi
>         fi
> }
> restart_rfcomm()
> {
>         if [ -x $RFCOMM ] && [ -f $RFCOMM_CONF ] ; then
>                if [ "$VERBOSE" != no ]; then
>                        log_progress_msg  "${RFCOMM##*/}"
>                        $RFCOMM unbind all || :
>                        $RFCOMM bind all || :
>                else
>                        $RFCOMM unbind all >/dev/null 2>&1|| :
>                        $RFCOMM bind all >/dev/null 2>&1 || :
>                fi
>         fi
> }
> case $1 in
>   start)
>         log_daemon_msg "Starting $DESC"
>         if test "$BLUETOOTH_ENABLED" = 0; then
>                 log_progress_msg "disabled. see /etc/default/bluetooth"
>                 log_end_msg 0
>                 exit 0
>         fi
>         start-stop-daemon --start --background $SSD_OPTIONS
>         log_progress_msg "${DAEMON##*/}"
>
>         udevadm trigger --verbose --action=add --subsystem-match=bluetooth --sysname-match=hci*
>         run_sdptool || :
>         start_uarts || :
>         if test "$HID2HCI_ENABLED" = 1; then
>                 enable_hci_input
>         fi
>         start_rfcomm || :
>         if test "$HIDD_ENABLED" = 1 ||
>                 test "$PAND_ENABLED" = 1 || test "$DUND_ENABLED" = 1; then
>                 log_progress_msg "compatibily daemons not started, see bluez-compat package"
>         fi
>         log_end_msg 0
>   ;;
>   stop)
>         log_daemon_msg "Stopping $DESC"
>         if test "$BLUETOOTH_ENABLED" = 0; then
>                 log_progress_msg "disabled."
>                 log_end_msg 0
>                 exit 0
>         fi
>         stop_rfcomm || :
>         if test "$HID2HCI_UNDO" = 1; then
>                 disable_hci_input
>         fi
>         start-stop-daemon --stop $SSD_OPTIONS
>         log_progress_msg "${DAEMON}"
>         stop_uarts || :
>         log_end_msg 0
>   ;;
>   restart|force-reload)
>         $0 stop
>         sleep 1
>         $0 start
>   ;;
>   status)
>         status_of_proc "$DAEMON" "$DESC" && exit 0 || exit $?
>   ;;
>   *)
>         N=/etc/init.d/bluetooth
>         echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
>         exit 1
>         ;;
> esac
> exit 0
>
>
> -- no debconf information
>
> _______________________________________________
> Pkg-bluetooth-maintainers mailing list
> Pkg-bluetooth-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-bluetooth-maintainers



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6



More information about the Pkg-bluetooth-maintainers mailing list