From 896de069d8c212e32bf966ffb9adaddf8e1dd402 Mon Sep 17 00:00:00 2001 From: =?utf8?q?K=C3=A9vin=20THIERRY?= Date: Mon, 20 Jan 2014 15:25:52 +0100 Subject: [PATCH] Add multi-user support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bug-Tizen: PTREL-371 Change-Id: Id96c88b2d5384e197ee74fdffa711f7c6120e462 Signed-off-by: Kévin THIERRY --- packaging/bluetooth-tools.spec | 11 ++++++----- scripts/bt-dev-start.sh | 2 +- scripts/bt-reset-env.sh | 3 ++- scripts/bt-stack-up.sh | 6 +++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packaging/bluetooth-tools.spec b/packaging/bluetooth-tools.spec index 84779c2..6495f86 100644 --- a/packaging/bluetooth-tools.spec +++ b/packaging/bluetooth-tools.spec @@ -1,14 +1,15 @@ Name: bluetooth-tools Summary: Bluetooth-tools Version: 0.2.35 -Release: 3 +Release: 0 Group: Network & Connectivity/Bluetooth License: Apache-2.0 Source0: %{name}-%{version}.tar.gz -Source1001: bluetooth-address.service +Source1001: bluetooth-address.service BuildRequires: cmake -Requires: bluetooth-tools-no-firmware Suggests: bluetooth-share +Requires: tizen-platform-config-tools +Requires : bluetooth-tools-no-firmware %description Tools fo bluetooth run/stop and set address @@ -17,7 +18,7 @@ Tools fo bluetooth run/stop and set address Summary: On/Off Bluetooth adapter Group: Network & Connectivity/Bluetooth Requires: %{name} = %{version}-%{release} -Requires: rfkill +Requires: rfkill Conflicts: bluetooth-firmware-bcm %description no-firmware @@ -30,7 +31,7 @@ On/Off bluetooth device export CFLAGS+=" -fpie -fvisibility=hidden" export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie" -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} +%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} make %{?jobs:-j%jobs} %install diff --git a/scripts/bt-dev-start.sh b/scripts/bt-dev-start.sh index dcd72f7..a0e513a 100755 --- a/scripts/bt-dev-start.sh +++ b/scripts/bt-dev-start.sh @@ -3,7 +3,7 @@ # Script for registering BT device BT_PLATFORM_DEFAULT_HCI_NAME="Tizen" -# Trun-on Bluetooth Chip +# Turn-on Bluetooth Chip /usr/sbin/rfkill unblock bluetooth diff --git a/scripts/bt-reset-env.sh b/scripts/bt-reset-env.sh index 4532357..1ce9fa9 100755 --- a/scripts/bt-reset-env.sh +++ b/scripts/bt-reset-env.sh @@ -6,7 +6,8 @@ killall -9 hciattach # Remove BT files and setting -rm -rf /opt/data/bluetooth/.bt_paired +eval $(tzplatform-get TZ_SYS_DATA) +rm -rf $TZ_SYS_DATA/bluetooth/.bt_paired rm -rf /var/lib/bluetooth/* # Initialize BT vconf values diff --git a/scripts/bt-stack-up.sh b/scripts/bt-stack-up.sh index 1e934a1..b48d955 100644 --- a/scripts/bt-stack-up.sh +++ b/scripts/bt-stack-up.sh @@ -8,7 +8,7 @@ /usr/etc/bluetooth/bt-dev-start.sh if !(/usr/bin/hciconfig | grep hci); then - echo "Registering BT device is failed." + echo "Registering BT device failed." exit 1 fi @@ -17,9 +17,9 @@ echo "Run bluetoothd" # We have to handle both systemd and sysvinit cases differently if [ -d /sys/fs/cgroup/systemd ]; then - # bt-service changes USER to 'app' via libprivilege-control, so it needs + # bt-service changes USER via libprivilege-control, so it needs # to know where the session bus is located under systemd - export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket + export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/dbus/user_bus_socket else # Under systemd, bluetoothd is dbus activated. sysvinit requires it to be # launched explicitly -- 2.7.4