From: DoHyun Pyun Date: Mon, 26 Sep 2016 04:04:39 +0000 (+0900) Subject: Add the script for BT off script when radio module's status is on X-Git-Tag: accepted/tizen/common/20160928.164247^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fconnectivity%2Fbluetooth-tools.git;a=commitdiff_plain;h=97de35a456fea35be5676eab1feca25aa2bbadc3 Add the script for BT off script when radio module's status is on Change-Id: Ia709864e1cabad98f6fce9a91ac2530cd9200c93 Signed-off-by: DoHyun Pyun --- diff --git a/packaging/bluetooth-tools.spec b/packaging/bluetooth-tools.spec index ba9c286..d10eb11 100644 --- a/packaging/bluetooth-tools.spec +++ b/packaging/bluetooth-tools.spec @@ -1,6 +1,6 @@ Name: bluetooth-tools Summary: Bluetooth-tools -Version: 0.2.35 +Version: 0.2.36 Release: 0 Group: Network & Connectivity/Bluetooth License: Apache-2.0 @@ -97,6 +97,9 @@ install -D -m 0644 LICENSE.APLv2 %{buildroot}%{_datadir}/license/bluetooth-tools %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-off.sh %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-hci-logdump.sh %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-run-hcidump.sh +%if "%{profile}" == "mobile" +%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-stack-down-with-radio.sh +%endif %{_datadir}/license/bluetooth-tools %{_unitdir}/multi-user.target.wants/bluetooth-address.service %{_unitdir}/bluetooth-address.service diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 03b021d..f9a751e 100755 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -5,6 +5,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) IF (TIZEN_MOBILE) INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/mobile/bt-stack-up.sh DESTINATION etc/bluetooth) INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/mobile/bt-stack-down.sh DESTINATION etc/bluetooth) +INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/mobile/bt-stack-down-with-radio.sh DESTINATION etc/bluetooth) INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/mobile/bt-reset-env.sh DESTINATION etc/bluetooth) ELSE () IF (TIZEN_WEARABLE) diff --git a/scripts/mobile/bt-stack-down-with-radio.sh b/scripts/mobile/bt-stack-down-with-radio.sh new file mode 100755 index 0000000..801481c --- /dev/null +++ b/scripts/mobile/bt-stack-down-with-radio.sh @@ -0,0 +1,22 @@ +#!/bin/sh +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +# +# Script for stopping Bluetooth stack +# + +# If radio is on, should not call the device down script +#/usr/etc/bluetooth/bt-dev-end.sh + +# Kill BlueZ bluetooth stack +killall obexd obex-client +killall bt-syspopup +killall bluetooth-pb-agent +killall bluetooth-map-agent +killall bluetooth-hfp-agent +killall bluetooth-ag-agent +killall bluetoothd +killall bluetooth-share + +# result +exit 0