From 04114fc1516a2fc6fbd309e874f6511a2380128c Mon Sep 17 00:00:00 2001 From: Deokhyun Kim Date: Tue, 7 Jan 2020 18:34:04 +0900 Subject: [PATCH] Add services for edutm mode Change-Id: I4adb97570b446b200e3891c95319aa36d469d110 Signed-off-by: Deokhyun Kim --- packaging/bluetooth-edutm-off.service | 11 +++++++++++ packaging/bluetooth-edutm-on.service | 12 ++++++++++++ scripts/bt-edutm-off.sh | 1 + scripts/bt-edutm-on.sh | 3 +++ 4 files changed, 27 insertions(+) create mode 100644 packaging/bluetooth-edutm-off.service create mode 100644 packaging/bluetooth-edutm-on.service diff --git a/packaging/bluetooth-edutm-off.service b/packaging/bluetooth-edutm-off.service new file mode 100644 index 0000000..4458e79 --- /dev/null +++ b/packaging/bluetooth-edutm-off.service @@ -0,0 +1,11 @@ +[Unit] +Description=Bluetooth EDUTM off + +[Service] +User=root +Group=root +Type=oneshot + +ExecStart=/usr/etc/bluetooth/bt-edutm-off.sh +ExecStartPost=/usr/bin/systemctl stop bluetooth-edutm-on +StandardOutput=journal+console diff --git a/packaging/bluetooth-edutm-on.service b/packaging/bluetooth-edutm-on.service new file mode 100644 index 0000000..70508dd --- /dev/null +++ b/packaging/bluetooth-edutm-on.service @@ -0,0 +1,12 @@ +[Unit] +Description=Bluetooth EDUTM on + +[Service] +User=root +Group=root +Type=oneshot + +ExecStart=/usr/etc/bluetooth/bt-edutm-on.sh +RemainAfterExit=yes +StandardOutput=journal+console +StandardError=inherit diff --git a/scripts/bt-edutm-off.sh b/scripts/bt-edutm-off.sh index ab4457f..af862e8 100755 --- a/scripts/bt-edutm-off.sh +++ b/scripts/bt-edutm-off.sh @@ -10,6 +10,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin # Remove BT device /usr/etc/bluetooth/bt-dev-end.sh +/usr/etc/bluetooth/bt-run-hci-logger.sh normal stop # result exit 0 diff --git a/scripts/bt-edutm-on.sh b/scripts/bt-edutm-on.sh index c1959b5..288b733 100755 --- a/scripts/bt-edutm-on.sh +++ b/scripts/bt-edutm-on.sh @@ -12,6 +12,9 @@ HCIDUMP_PATH="${HCIDUMP_DIR}/${HCIDUMP_FILENAME}" LOGDUMP_DIR="/opt/etc/dump.d/module.d" LOGDUMP_PATH="${LOGDUMP_DIR}/bt-hci-logdump.sh" +# Start HCI logging +/usr/etc/bluetooth/bt-run-hci-logger.sh normal start btmon + # Register BT Device /usr/etc/bluetooth/bt-dev-start.sh -- 2.7.4