From 971bf1f768bc6af1b4b1cc7f6a80a6362b4645f2 Mon Sep 17 00:00:00 2001
From: Lang Daniel <d.lang@abatec.at>
Date: Thu, 16 Mar 2023 13:53:14 +0000
Subject: [PATCH] package/bluez5_utils: fix SysV init script

- Use daemon name (bluetoothd) as file name.
- Script doesn't need to be executable.

Signed-off-by: Daniel Lang <d.lang@abatec.at>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 456204e7e02cc787cee65711409025245ce337de)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 .checkpackageignore                                  | 1 -
 package/bluez5_utils/{S40bluetooth => S40bluetoothd} | 0
 package/bluez5_utils/bluez5_utils.mk                 | 4 ++--
 3 files changed, 2 insertions(+), 3 deletions(-)
 rename package/bluez5_utils/{S40bluetooth => S40bluetoothd} (100%)
 mode change 100755 => 100644

diff --git a/.checkpackageignore b/.checkpackageignore
index 04966a9b06..4faa3a8b8f 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -8,7 +8,6 @@ package/avahi/S05avahi-setup.sh Indent Variables
 package/avahi/S50avahi-daemon Indent Variables
 package/babeld/S50babeld Indent Shellcheck Variables
 package/bind/S81named Indent Shellcheck Variables
-package/bluez5_utils/S40bluetooth NotExecutable Variables
 package/boinc/S99boinc-client Indent Shellcheck Variables
 package/brickd/S70brickd Indent Shellcheck Variables
 package/brltty/S10brltty Indent Shellcheck Variables
diff --git a/package/bluez5_utils/S40bluetooth b/package/bluez5_utils/S40bluetoothd
old mode 100755
new mode 100644
similarity index 100%
rename from package/bluez5_utils/S40bluetooth
rename to package/bluez5_utils/S40bluetoothd
diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk
index 76070dc3a9..f6344ce2cd 100644
--- a/package/bluez5_utils/bluez5_utils.mk
+++ b/package/bluez5_utils/bluez5_utils.mk
@@ -184,8 +184,8 @@ BLUEZ5_UTILS_CONF_OPTS += --disable-systemd
 endif
 
 define BLUEZ5_UTILS_INSTALL_INIT_SYSV
-	$(INSTALL) -m 0755 -D package/bluez5_utils/S40bluetooth \
-		$(TARGET_DIR)/etc/init.d/S40bluetooth
+	$(INSTALL) -m 0755 -D package/bluez5_utils/S40bluetoothd \
+		$(TARGET_DIR)/etc/init.d/S40bluetoothd
 endef
 
 $(eval $(autotools-package))