Add path and service files for hciconfig command 34/189834/3 accepted/tizen_5.0_unified tizen_5.0 accepted/tizen/5.0/unified/20181102.015259 accepted/tizen/unified/20180928.080501 submit/tizen/20180927.020120 submit/tizen_5.0/20181101.000003
authorWootak Jung <wootak.jung@samsung.com>
Fri, 21 Sep 2018 04:54:08 +0000 (13:54 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 27 Sep 2018 00:44:09 +0000 (09:44 +0900)
Change-Id: I883c855b3309eabf9fd35bb93ae5c85dad301873

packaging/bluetooth-hci-down.path [new file with mode: 0644]
packaging/bluetooth-hci-down.service [new file with mode: 0644]
packaging/bluetooth-hci-up.path [new file with mode: 0644]
packaging/bluetooth-hci-up.service [new file with mode: 0644]
packaging/bluetooth-tools.spec

diff --git a/packaging/bluetooth-hci-down.path b/packaging/bluetooth-hci-down.path
new file mode 100644 (file)
index 0000000..9e64a75
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=Path activation for the "hciconfig hci0 down"
+
+[Path]
+PathExists=/run/.hci_down
diff --git a/packaging/bluetooth-hci-down.service b/packaging/bluetooth-hci-down.service
new file mode 100644 (file)
index 0000000..59f3ed9
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=Bluetooth hci down
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/hciconfig hci0 down
diff --git a/packaging/bluetooth-hci-up.path b/packaging/bluetooth-hci-up.path
new file mode 100644 (file)
index 0000000..959ec0b
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=Path activation for the "hciconfig hci0 up"
+
+[Path]
+PathExists=/run/.hci_up
diff --git a/packaging/bluetooth-hci-up.service b/packaging/bluetooth-hci-up.service
new file mode 100644 (file)
index 0000000..cc09077
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=Bluetooth hci up
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/hciconfig hci0 up
index 02c99f7..015ecd9 100644 (file)
@@ -109,6 +109,11 @@ install -D -m 0644 packaging/bluetooth-stack-down-with-radio.path %{buildroot}%{
 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
 
+install -D -m 0644 packaging/bluetooth-hci-up.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-up.service
+install -D -m 0644 packaging/bluetooth-hci-up.path %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-up.path
+install -D -m 0644 packaging/bluetooth-hci-down.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-down.service
+install -D -m 0644 packaging/bluetooth-hci-down.path %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-down.path
+
 %post
 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
 mkdir -p %{_libdir}/systemd/system/multi-user.target.wants/
@@ -129,6 +134,12 @@ ln -sf %{_libdir}/systemd/system/bluetooth-stack-down.path %{_libdir}/systemd/sy
 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/
+ln -sf %{_libdir}/systemd/system/bluetooth-hci-up.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+ln -sf %{_libdir}/systemd/system/bluetooth-hci-up.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-hci-up.path
+ln -sf %{_libdir}/systemd/system/bluetooth-hci-up.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+ln -sf %{_libdir}/systemd/system/bluetooth-hci-down.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+ln -sf %{_libdir}/systemd/system/bluetooth-hci-down.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-hci-down.path
+ln -sf %{_libdir}/systemd/system/bluetooth-hci-down.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
 
 
 %files
@@ -156,6 +167,10 @@ ln -sf %{_libdir}/systemd/system/bluetooth-force-hci-logger.service %{_sysconfdi
 %{_libdir}/systemd/system/bluetooth-hci-dump@.service
 %{_libdir}/systemd/system/bluetooth-stack-down.service
 %{_libdir}/systemd/system/bluetooth-stack-down.path
+%{_libdir}/systemd/system/bluetooth-hci-up.service
+%{_libdir}/systemd/system/bluetooth-hci-up.path
+%{_libdir}/systemd/system/bluetooth-hci-down.service
+%{_libdir}/systemd/system/bluetooth-hci-down.path
 
 %post profile_common
 pushd %{_prefix}/etc/bluetooth/