Add the service files to run bt-stack-down*.sh via file activation 72/180272/1 accepted/tizen/unified/20180611.015232 submit/tizen/20180531.061844 submit/tizen/20180607.003351
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 28 May 2018 04:39:17 +0000 (13:39 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 28 May 2018 04:39:17 +0000 (13:39 +0900)
Change-Id: I65c399178d41ecee0a47bf6e62c1deb37ffa3f24
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
packaging/bluetooth-stack-down-with-radio.path [new file with mode: 0644]
packaging/bluetooth-stack-down-with-radio.service [new file with mode: 0644]
packaging/bluetooth-stack-down.path [new file with mode: 0644]
packaging/bluetooth-stack-down.service [new file with mode: 0644]
packaging/bluetooth-tools.spec

diff --git a/packaging/bluetooth-stack-down-with-radio.path b/packaging/bluetooth-stack-down-with-radio.path
new file mode 100644 (file)
index 0000000..b9a8603
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=Path activation for the "bluetooth-stack-down-with-radio.service"
+
+[Path]
+PathExists=/run/.bt_stack_down_with_radio
\ No newline at end of file
diff --git a/packaging/bluetooth-stack-down-with-radio.service b/packaging/bluetooth-stack-down-with-radio.service
new file mode 100644 (file)
index 0000000..e163009
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=Service to run bt-stack-down-with-radio.sh script to terminate BT functions
+
+[Service]
+Type=oneshot
+ExecStart=/usr/etc/bluetooth/bt-stack-down-with-radio.sh
diff --git a/packaging/bluetooth-stack-down.path b/packaging/bluetooth-stack-down.path
new file mode 100644 (file)
index 0000000..0e2c46f
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=Path activation for the "bluetooth-stack-down.service"
+
+[Path]
+PathExists=/run/.bt_stack_down
\ No newline at end of file
diff --git a/packaging/bluetooth-stack-down.service b/packaging/bluetooth-stack-down.service
new file mode 100644 (file)
index 0000000..784a278
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=Service to run bt-stack-down.sh script to terminate BT functions
+
+[Service]
+Type=oneshot
+ExecStart=/usr/etc/bluetooth/bt-stack-down.sh
index 8953f8e..79ccf1e 100644 (file)
@@ -103,6 +103,9 @@ install -D -m 0644 packaging/bluez-start.path %{buildroot}%{_libdir}/systemd/sys
 install -D -m 0644 packaging/bluetooth-share-start.service %{buildroot}%{_libdir}/systemd/system/bluetooth-share-start.service
 install -D -m 0644 packaging/bluetooth-share-start.path %{buildroot}%{_libdir}/systemd/system/bluetooth-share-start.path
 
+install -D -m 0644 packaging/bluetooth-stack-down.service %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down.service
+install -D -m 0644 packaging/bluetooth-stack-down.path %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down.path
+
 install -D -m 0644 packaging/bluetooth-force-hci-logger.service %{buildroot}%{_libdir}/systemd/system/bluetooth-force-hci-logger.service
 install -D -m 0644 packaging/bluetooth-hci-dump@.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-dump@.service
 
@@ -125,6 +128,10 @@ ln -sf %{_libdir}/systemd/system/bluetooth-share-start.service %{_sysconfdir}/sy
 ln -sf %{_libdir}/systemd/system/bluetooth-share-start.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-share-start.path
 ln -sf %{_libdir}/systemd/system/bluetooth-share-start.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
 
+ln -sf %{_libdir}/systemd/system/bluetooth-stack-down.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+ln -sf %{_libdir}/systemd/system/bluetooth-stack-down.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-stack-down.path
+ln -sf %{_libdir}/systemd/system/bluetooth-stack-down.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+
 ln -sf %{_libdir}/systemd/system/bluetooth-force-hci-logger.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
 
 
@@ -153,6 +160,8 @@ ln -sf %{_libdir}/systemd/system/bluetooth-force-hci-logger.service %{_sysconfdi
 %{_libdir}/systemd/system/bluetooth-share-start.path
 %{_libdir}/systemd/system/bluetooth-force-hci-logger.service
 %{_libdir}/systemd/system/bluetooth-hci-dump@.service
+%{_libdir}/systemd/system/bluetooth-stack-down.service
+%{_libdir}/systemd/system/bluetooth-stack-down.path
 
 %post profile_common
 pushd %{_prefix}/etc/bluetooth/