acpid: prevent duplicate daemon instances
authorOliver Sedlbauer <redacted>
Thu, 19 Feb 2026 10:36:51 +0000 (11:36 +0100)
committerFlorian Eckert <redacted>
Mon, 2 Mar 2026 12:37:58 +0000 (13:37 +0100)
The hotplug script directly invokes /usr/sbin/acpid. If hotplug fires
before procd starts acpid, it cannot stop the procd-managed instance,
resulting in a second unmanaged acpid process running alongside it.

Fix this issue by letting ONLY procd manage the acpi daemon.

Signed-off-by: Oliver Sedlbauer <redacted>
utils/acpid/Makefile
utils/acpid/files/acpid.hotplug
utils/acpid/files/acpid.init

index ff894a302df91e9d801e06620b2c42b6c0797cac..dac3015ee4437055a48c92b051845709c6601e43 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=acpid
 PKG_VERSION:=2.0.34
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/acpid2
index 6e08d01a22036897a290123512385c667deea4e2..60d62ecae85f11b749399b1bef0940cbd2d4cc95 100644 (file)
@@ -1,7 +1,5 @@
 #!/bin/sh
 
-. /lib/functions.sh
-
 if [ "$ACTION" = add ] && [ "$DEVICENAME" = event0 ]; then
-        ( /etc/init.d/acpid/stop; sleep 3; /usr/sbin/acpid )&
+       /etc/init.d/acpid start
 fi
index 411eea255a2392ceea7ad2fddd1d0755177732b9..1424814d1631fd2bb105be4d0b48b4b57f9f0608 100644 (file)
@@ -12,6 +12,7 @@ start_service() {
        procd_append_param command -f
        procd_append_param command -S
        procd_set_param pidfile "/var/run/acpid.pid"
+       procd_close_instance
 }
 
 reload_service() {
git clone https://git.99rst.org/PROJECT